[collectd] exec-nagios and pseudo-hashes

Tom Throckmorton throck at gmail.com
Mon Feb 23 22:50:03 CET 2009


Hello,

I'm looking to use the exec-nagios script from contrib, hit a snag, and am
wondering if anyone else has seen this and/or knows a fix.  Seems like the
script was written to assume that the same script/plugin would never be called
twice.  For example, a configuration like this:

|<Script /path/to/nagios/plugins/check_this>
|   Arguments -H somehost -w 10 -c 60
|   Type delay
|</Plugin>
|
|<Script /path/to/nagios/plugins/check_somethingelse>
|   Arguments -H somehost -w 10 -c 60
|   Type delay
|</Plugin>

...works as expected (script runs, PUTNOTIF/PUTVAL to stdout, etc.).  However,
calling the same script/plugin twice with different arguments does not:

|<Script /path/to/nagios/plugins/check_this>
|    Arguments -H somehost -w 10 -c 60
|    Type delay
|</Plugin>
|
|<Script /path/to/nagios/plugins/check_this>
|    Arguments -H differenthost -w 10 -c 60
|    Type delay
|</Plugin>

In this case, the script returns an error:

| Pseudo-hashes are deprecated at ./exec-nagios.px line 126.
| No such pseudo-hash field "script" at ./exec-nagios.px line 126.

My perl-fu is not strong, but it looks like the way the hash of Scripts is
being constructed in handle_config_plugin would account for this.  Before I get
too deep, can anyone recommend a good way to address/correct this?

Cheers,

-tt





More information about the collectd mailing list