Ok, so let me try to understand what you are attempting to do here. Do you just want to ping a printer, from your Nagios Monitoring Box? Or do you want to ping the printer from another host that the Nagios monitoring box is monitoring?
The reason I ask is it looks like all you are inevitably doing is a check_ping, so why not do that from the Nagios host? The NRPE would be used if you wanted to run a command on a remote computer. And in this case, ping a device from a remote computer. So why not just ping it from the Nagios host vs. the remote computer. HTH -Mark -----Original Message----- From: Henrik Morsing [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 5:26 AM To: [email protected] Subject: [Nagios-users] Sending $HOSTADDRESS$ or other to NRPE 'morning and merry christmas to all. I spent a good many hours yesterday on trying to simplify using NRPE by grouping some tests and sending a hostname to NRPE at the other end. I've tried all possible (almost) configuration and order of variables etc. but this just doesn't seem to be possible. So, in services.cfg I have: # Service definition define service{ use generic-service ; Name of service template to use hostgroup_name kg-printer service_description KG-Printer [...] check_command check_nrpe!check_printer } In checkcommands.cfg I have: define command { command_name check_printer command_line /usr/lib/nagios/plugin/check_nrpe -H kg -c check_printer -a $HOSTADDRESS$ $ARG1$ $ARG2$ } And in nrpe_local.cfg I have: command[check_printer]=/usr/lib/nagios/plugins/check_ping -H $ARG1$ -w 100.0,20% -c 500.0,60% My question is why it is not possible to send the host address to nrpe at the other end? I've tried doing this for check-printer-alive in ping.cfg as well with no luck. I even replaced check_printer which is called by NRPE with a script that showed me which variables got passed on the command line and all I got was $HOSTADDRESS$ which was "sh" with a control character at the end! Has someone actually tried this before? Or am I doing this the wrong way completely? Googling has given me virtually nothing. Thanks for any pointers! Regards, Henrik Morsing ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Nagios-users mailing list [email protected] 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 ******************************************************************************* The views, opinions, and judgments expressed in this message are solely those of the author. The message contents have not been reviewed or approved by the UFT Welfare Fund. ******************************************************************************* ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Nagios-users mailing list [email protected] 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
