SNMP Process check
Travis J. Noll
tjn at umn.edu
Tue Oct 18 16:59:33 CEST 2005
G,
try cd'ing to your nagios/bin directory and then running
/where/nagios/lives/plugins/your_plugin_name.pl [ARGS] as the nagios user.
In my case:
/usr/local/nagios/libexec/check_snmp_process.pl -H <IP
removed> -C <community removed> -n BRMService.exe
Also, try to change the shebang line to include the libexec directory.
mine changed to this:
#!/usr/local/perl5.8.3/bin/perl -wI /usr/local/nagios/libexec
-Travis
G Davies wrote:
> I'm fairly new to Nagios (ok, I installed it this morning) but I think
> I've understood things correctly yet I still can't get a plugin to
> work as expected.
>
> The plugin in question monitors whether a specific process is running
> on a Win2k machine using SNMP, if I run it from the command line I
> get...
>
> hostname:/usr/lib/nagios/plugins# ./check_snmp_process.pl -H <IP
> removed> -C <community removed> -n BRMService.exe
> 1 process matching BRMService.exe (> 0)
>
> echo $? shows the return value was 0 so as far as I can see (according
> to the plugin development guidelines) everything is working to spec (1
> line returned, return value of 0).
>
> However, from Nagios I get "No Output!" in the status information
> field and a critical warning. I tried the debug method suggested in
> the Wiki (http://www.nagios.org/faqs/viewfaq.php?faq_id=162) and I get
> the correct parameters in the log file (incidentally, there's a >>
> missing from line 3 of that example script) but still nothing
> returned.
>
> Permissions on the script are the same as for all the other plugins
> (check_ping is working fine on that host) and it works ok from the
> command line so I have no idea what's wrong.
>
> The relevant services.cfg fragment is below...
>
> define service {
> use generic-service
> name check_brm_process
> host_name <hostname removed>
> service_description BRM Rules Monitor
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 1
> contact_groups nt-admins
> notification_interval 120
> notification_period 24x7
> notification_options c,r
> check_command check_snmp_process!public!BRMService.exe
> register 1
> }
>
> ...and here's the relevant checkservices.cfg fragment...
>
> define command{
> command_name check_snmp_process
> command_line $USER1$/check_snmp_process.pl -H $HOSTADDRESS$
> -C $ARG1$ -n $ARG2$
> }
>
> Have I done something stupid? As far as I can see it should all work fine.
>
> Regards,
>
> G
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list