So, nobody has any experience with custom variables and changing them via external command? It would save me a database if I can get this working.
Thanks, -stefan On Wed, Oct 08, 2008 at 07:52:27PM +0200, Andreas Ericsson wrote: > Stefan Strandberg wrote: > >Hi, > > > >I'm attempting to implement some custom variables for hosts. Supposedly > >the external command to change the custom variable for a host is > >CHANGE_CUSTOM_HOST_VAR with a certain syntax. Unfortunately for me, it > >doesn't seem to be working. > > > >Nagios receives the command and logs it, but doesn't seem to actually > >process it. > > > >The command given is: > > > >-- start script -- > > > >#!/bin/sh > > > >now=`date +%s` > >commandfile='/var/lib/nagios3/rw/nagios.cmd' > > > >/usr/bin/printf "[%lu] > >CHANGE_CUSTOM_HOST_VAR;dent;_REPAIRSTATUS;repair\n" $now > $commandfile > > > >-- end script -- > > > >and nagios logs it with > >[1223412361] EXTERNAL COMMAND: > >CHANGE_CUSTOM_HOST_VAR;dent;_REPAIRSTATUS;repair > > > >in nagios.log, so I think it should be working. > > Nagios always logs external commands, even if they're properly formatted > or not. The logging happens before the command is processed, not after, > so there's no telling if Nagios does the right thing with it or not. > > > However, the variable > >never changes in the status.dat file. > > > >Am I missing a step or doing something wrong? The documentation doesn't > >have any other examples, and nothing turns up on google. > > > > I can imagine. This is, afaik, the first time the question has been > asked on the nagios-users list. > > -- > Andreas Ericsson [EMAIL PROTECTED] > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > -- Stefan Strandberg UNIX group Computer Aided Engineering - UW Madison [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nagios-users mailing list Nagios-users@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