Menu

#22 use of command_line dependant on ver of Nagios

open
nobody
None
5
2005-04-19
2005-04-19
Anonymous
No

When adding to checkcommands.cfg, you may need to
modify the command_line depending on which version of
Nagios you use.

If you're using Nagios v1.x, leave as is.
If you're using Nagios v2.0, you need to modify some of
the varibles:
$LASTCHECK$ -> $LASTSERVICECHECK$
$OUTPUT$ -> $SERVICEOUTPUT$
$PERFDATA$ -> $SERVICEPERFDATA$

I found this by using the example command_line example
in the Nagios documentation:
http://nagios.sourceforge.net/docs/1_0/xpddefault.html
or
http://nagios.sourceforge.net/docs/2_0/perfdata.html
and watching the outputs of
/var/log/nagios/service-perfdata.out and
/usr/share/nagios/nagiostat/debug.log

The service-perfdata.out should show what and if perf
data is given by Nagios. The debug.log should show what
and if data is received by nagiostat.

Hope that helps someone. Can the README file be
updated? TIA.

--
Curtis Brown
curtisb@yuma.acns.colostate.edu

Discussion

  • Nate Hardy

    Nate Hardy - 2005-11-03

    Logged In: YES
    user_id=1372297

    Thanks, this sure helped me out. :)

    Nate Hardy

     
  • Nobody/Anonymous

    Logged In: NO

    The following command_line worked best for me:

    command_line echo
    "\"$LASTSERVICECHECK$|!!|$HOSTNAME$|!!|$SERVICEDESC$|!!|$SERVICESTATE$|!!|$SERVICEOUTPUT$|!!|$SERVICEPERFDATA$\""
    | xargs /usr/lib/nagios/nagiostat/nagiostat -p

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.