Passive Network Sensor External Application
-
tubosunedward
- Posts: 7
- Joined: Fri Aug 02, 2013 5:15 pm
Passive Network Sensor External Application
Hi,
Please I have a problem, I don't know how to integrate the passive ping network sensor I have written in perl with the nagios monitoring tool and have read so many articles without proper direction. The external program runs and works find which listens to broadcast traffic which are ARP and UDP rather than actively pinging the host.
I would be very happy if you can just give me a guideline how to integrate the program with the nagios system so the nagios tool can be used to view this services.
Edward
Please I have a problem, I don't know how to integrate the passive ping network sensor I have written in perl with the nagios monitoring tool and have read so many articles without proper direction. The external program runs and works find which listens to broadcast traffic which are ARP and UDP rather than actively pinging the host.
I would be very happy if you can just give me a guideline how to integrate the program with the nagios system so the nagios tool can be used to view this services.
Edward
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Passive Network Sensor External Application
Have you read our development guidelines on how to integrate external scripts in the proper plugin format?:
http://nagiosplug.sourceforge.net/devel ... lines.html
I assume you are able to run the script and return valid output from the command line? Can you share the script you wrote? Other than that, the guidelines should provide what you need to integrate properly.
http://nagiosplug.sourceforge.net/devel ... lines.html
I assume you are able to run the script and return valid output from the command line? Can you share the script you wrote? Other than that, the guidelines should provide what you need to integrate properly.
-
tubosunedward
- Posts: 7
- Joined: Fri Aug 02, 2013 5:15 pm
Re: Passive Network Sensor External Application
Thanks for your reply, I really do appreciate it. I am just having issues integrating it with nagios system to get it working, the code works well and displays the ip address of the live host which it detects by the kind of traffic passed.
The external application displays the ip address of the host that are live on the network sniffing this UDP and TCP packets rather than using active check_ping
I would be very happy if you could assist me.
Kind Regards
Edward.
The external application displays the ip address of the host that are live on the network sniffing this UDP and TCP packets rather than using active check_ping
I would be very happy if you could assist me.
Kind Regards
Edward.
Re: Passive Network Sensor External Application
Could you post a copy of the script in code wraps?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
tubosunedward
- Posts: 7
- Joined: Fri Aug 02, 2013 5:15 pm
Re: Passive Network Sensor External Application
Kindly find the script attached.
Re: Passive Network Sensor External Application
You should read over the plugin dev. doc. There are a number of things you will have to do to fix up the script. Lines like:
should flat out be removed, as they will mess up your status string. I would suggest that you try to fit the output onto 1 line in the format:
Additionally, make sure you have some conditions for exit as the exit codes are what Nagios uses to determine the state (UP,DOWN, Critical etc) of the check.
Code: Select all
print "-----------------------------------"Code: Select all
<status information> | <performance data>Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
tubosunedward
- Posts: 7
- Joined: Fri Aug 02, 2013 5:15 pm
Re: Passive Network Sensor External Application
Thanks for the reply, for passive checks how will nagios be configured to read the script... also can you suggest conditional codes I can use for this exits?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Passive Network Sensor External Application
You will need to use some sort of local way of triggering this script, then using that mode of transportation to send the data up to Nagios, a few options come to mind such as NRDS, NRDP, NSCA.
-
tubosunedward
- Posts: 7
- Joined: Fri Aug 02, 2013 5:15 pm
Re: Passive Network Sensor External Application
so in summary for passive checks I would need to use something like the NSCA and also ensure I edit the code to have exit codes 0,1,2,3?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Passive Network Sensor External Application
Yes it must exit with a valid exit code based on warning and critical values, this way, Nagios will change the object's state. And yes, to use this plugin passively you will need to use a passive protocol, NSCA is one, but the others mentioned work fine as well.