NSClient++ Help (#1) - Check File Content (#921) - Message List

Check File Content

Hi.

I'm new with Nagios. And now im trying to update the Client on some test-systems.

And I'm searching for a alternative to check a file for a specific word. If this word is found in the file, then Nagios should bring a warning. Is something like this possible with the nsclient?

Thanks

  • Message #2479

    Hi, no solution?

    • Message #2480

      My limited understanding is that this is not currently available in any nscp module. I am also looking to implement this type of log file check.

      I am currently trying to develop a hybrid solution that uses check_logfiles by Consol Labs. I'm hoping to leverage nscp as the scheduler that can run check_logfiles and report the results as a passive check.

      Ultimately, I'd like to eliminate the use of check_logfiles and see nscp provide the ability of real-time log file monitoring that is similar to the current real-time event log monitoring.

      Does anyone else have a working passive check solution?

      Thanks.

      mikep

      • Message #2481

        I could maybe be talked into adding this fairly soon after 0.4.0 is out the door.

        Which means if you give me some ideas about what kind of features you expect we could probably have in the next 3-4 weeks...

        Michael Medin

        • Message #2487

          I'm thinking that the log file monitoring would work similar to the event log monitoring. I'm more interested in real-time monitoring, but others may prefer time interval based monitoring.

          Basic features:

          1) Ability to specify which file to monitor.

          2) Ability to create multiple filters with aliases. Each filter would specify what pattern to match.

          3) Patterns could be regular expressions.

          4) Line with matching pattern is returned as the alert message.

          5) Ability to define different severities for different patterns. i.e. for the same alias (Nagios service name) you can define different patterns for Ok, Warning, and Critical.

          6) Ability to define max age value for real-time monitors, before an OK is sent.

          Enhanced features:

          7) Support for log file rotation schemes.

          8) Ability to run a script when a pattern is matched.

          Is that a good start? Let me know if you would like any clarification or actual use cases.

          I think what I have described is very similar to your event log monitoring implementation.

          Thanks!

          mikep

Subscriptions