Am 06.05.2013 18:24, schrieb Ives Laaf:
Hi List,
I feel a bit stupid right now, but I thought I'd read that it is
possible to use shell scripts as command. In special I would like to
use a bash script for the process-host-perfdata-file command.
Idea is that the batch file does several file operations - instead of
one mv with the pferdata file so that the local pnp4nagios can process
one copy and another process can fetch the second copy and do some
other stuff with it.
Batchfile: /usr/local/export-data/performance/cp_mv.sh
command_line: /usr/local/export-data/performance/cp_mv.sh $TIMET$
Batchfile:
#!/bin/bash
/bin/mv /usr/local/pnp4nagios/var/host-perfdata
/usr/local/export-data/tmp/host-perfdata.$1
/bin/cp /usr/local/export-data/tmp/host-perfdata.*
/usr/local/export-data/performance/spool/
/bin/mv /usr/local/export-data/tmp/host-perfdata.*
/usr/local/pnp4nagios/var/spool/
So, but I don't get this called by the nagios process?! With or
without .sh ...
Any hints?
Can't I do this?
Must it be perl?
Thanks a lot.
With kind regards,
Ives
Is the script executable for the Icinga user? Are there any messages in
icinga.log? Are you sure that this command_line is associated with
process-host-perfdata-file? Is PNP configured to run in Bulk Mode or
Bulk Mode with npcd?
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users