Exec plugin in nagios logserver

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Exec plugin in nagios logserver

Post by scottwilkerson »

saleemthupsee wrote:i have verified once more the execution of the exec command by substituting the command echo to a text file. the parameters passed on the script through fields i.e %{fieldname} are not replaced by their field contents. i only have the output %{fieldname} in plain text in the text file instead of the contents of the fieldname being replaced in text file.

Anything wrong in my syntax. I checked through logstash 1.5 doc. to use %{fieldname} to gather the variables. the example is

command => "iptables -A INPUT -s %{clientip} -j DROP"

mine is :

exec {
command => "/usr/local/nagioslogserver/scripts/send_nrdp.sh -su http://192.168.97.2/nrdp -t ######## -H localhost -s %{channel_name} -S %{sh_status} -o testfromlogserver"


}
This is completely different than the command you posted before.

Is is possible for us to work one problem at a time?

to start with, I think you have an error in the command, this

Code: Select all

-su http://192.168.97.2/nrdp 
should be this

Code: Select all

-u http://192.168.97.2/nrdp 
The we need to be sure that %{sh_status} produces an integer
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
saleemthupsee
Posts: 107
Joined: Wed Feb 15, 2017 4:22 am
Location: Paris France
Contact:

Re: Exec plugin in nagios logserver

Post by saleemthupsee »

attached is the log file requested.
You do not have the required permissions to view the files attached to this post.
Saleem THUPSEE
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Exec plugin in nagios logserver

Post by scottwilkerson »

saleemthupsee wrote:attached is the log file requested.
So there is no failure reference in the logs, can you address the question I had in the post above?
https://support.nagios.com/forum/viewto ... 10#p230660
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
saleemthupsee
Posts: 107
Joined: Wed Feb 15, 2017 4:22 am
Location: Paris France
Contact:

Re: Exec plugin in nagios logserver

Post by saleemthupsee »

hello Scott, i have resolved this using curl to update the passive status in NagiosXI instead of using the send_nrdp.sh to update the status.

cheers,
Saleem

PS: this ticket can be closed as well !
Saleem THUPSEE
kyang

Re: Exec plugin in nagios logserver

Post by kyang »

Thanks for telling us! I'll be closing this forum as resolved if you have more questions feel free to create another forum topic.

Thank you for using the Nagios Support Forums.
Locked