On 11.09.2012 21:46, Steven Schwartz wrote: > > So, I’m trying to use send_nsca to have a failover server. The problem > is that while some checks work, producing output like this: > > [1347392555] EXTERNAL COMMAND: > PROCESS_SERVICE_CHECK_RESULT;tulip8-pcfp11;discovery;0;0:discovery enabled > > Sometimes, I get: > > [1347392540] EXTERNAL COMMAND: > PROCESS_SERVICE_CHECK_RESULT;s3-afp-1-t1c1s8;$SERVICEDESC$;-1;$SERVICEOUTPUT$ > > [1347392540] Warning: Passive check result was received for service > '$SERVICEDESC$' on host 's3-afp-1-t1c1s8', but the service could not > be found! > > I have a log program running within the standard submit_check_result, > and for a good service check I see: > > Submitted hostname: db-emmidprod-1 svc desc PING state_string OK > return code 0 plugin output 0:Host alive to send_ncsa > > While on bad checks I get: > > Submitted hostname: trackid-gnstest-1 svc desc $SERVICEDESC$ > state_string $ return code -1 plugin output $SERVICEOUTPUT$ to send_ncsa > > The line I’m using in submit_check_result is this: > > echo "Submitted hostname: $1 svc desc $2 state_string $3 return code > $return_code plugin output $4 to send_ncsa" >> /tmp/nscalog > > So – the values being passed to submit_check_result from > obsess_over_services is, when it goes wrong: > > <hostname> $SERVICEDESC$ $ -1 $SERVICEOUTPUT$ > > Anyone have an idea why it would be doing that? The checks appear to > be working in the local web interface. >
you should make sure that macros are grabbed / resolved correctly. the current core behaviour on unknown macros is to leave them as is on the output. that of course is rather irritating, and will cause scripts and notifications to actually interpret those values. we will change that behaviour in 1.8 and only log a warning on unknown macros, cleaning them from the output. https://dev.icinga.org/issues/2291 in your case, you should put a check onto your submitted arguments, validating that they are not macros, until 1.8 is out. other than that, you are probably calling that script in the wrong way - i guess, this script is also called when you actually send host check results, where the service macros do not fit. kind regards, michael > Steven Schwartz > > Gracenote, Inc. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > icinga-users mailing list > icinga-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/icinga-users -- DI (FH) Michael Friedrich Lead Icinga Core Developer https://www.icinga.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ icinga-users mailing list icinga-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/icinga-users