I’m configuring my first passive check, and will have some questions along the way.
First: I need to run a script on a client at exactly 4AM each morning, and report back on what it finds. I’m thinking the linux client should run a cron job at 4AM, do the checks, and report back using nsca and passive checks. Does this sound like a use of passive checks? Would passive checks be any more or less than making active checks from the server work?
Second: I’m thinking a template for “generic-passive_check-service” would be a good alternative, since a lot of things in “generic-service” might not be appropriate. Any thoughts?
Third Question:
As a test, I’m trying to echo a passive check result to the external command file on the server.
The text of the command looks good, and protections on the external command file are open temporarily.
But the service defined on the client host doesn’t show the result.
Should I see the result in nagios.log? in the system log file? anywhere else?
I guess the nagios.cmd file will always be unreadable and zero length, because it’s a pipe, so I won’t see it there.
Yes, the set up was OK. Looks like the Nagios server had problems that were fixed by a restart. Now echoing the external command to the nagios.cmd file showed up in the nagios log file and updated the service on the web interface.
Next problem is that I can’t get nsca to run interactively (the test suggested in the nsca doc).
Compilation on Solaris 10 seemed to go fine, although the mcrypt library is missing.
But “nsca -c nsca.cfg” just exits quietly, with no clues. Debug is turned on in nsca.cfg, but syslog is silent too.