As I said, it's possible to extract the data from the variables you
mentioned.
*[root@bravura ~]# cat /usr/local/nagios/libexec/just_test*
#!/bin/bash
echo $NAGIOS_HOSTNAME
*Define a command:*
define command {
command_namejust_test_cmd
command_line$USER1$/just_test
Hello there,
Thanks for fast reply.
I have that setting in my nagios.cfg file:
enable_environment_macros=1
Do you know how can I make this possible, if it is really possible...
Best regards,
Bruno
On Thu, Aug 2, 2012 at 11:32 AM, Assaf Flatto wrote:
> **
> The marco's are internal to nagios
You need to append "NAGIOS_" eg. NAGIOS_NOTIFICATIONTYPE. And also make
sure you do "enable_environment_macros=1" in nagios.cfg
Ruslan
On Thu, Aug 2, 2012 at 12:32 PM, Assaf Flatto wrote:
> **
> The marco's are internal to nagios and will not be read from an external
> text file .
>
> there is
The marco's are internal to nagios and will not be read from an external
text file .
there is a way to make nagios macros available to external commands (
look for "macros" in the nagios.cfg file)
But what you are trying to do with the message.txt file will fail to
work as the SendEmail scri
Hello list,
How can I access Nagios variables like $NOTIFICATIONTYPE$, $SHORTDATETIME$,
etc from a text file passed in a command?
I have one command which is:
/usr/local/bin/sendEmail -o message-file=/etc/nagios/message.txt ... bla
bla bla
And inside message.txt I have those variables. However w