I am trying to get the check_iptables plugin working to allow me to monitor one of our server's firewall rules. I have been looking at this problem long enough, the problem is proably staring me in the face, and I cannot see it.
My monitoring server is Nagios Core 3.4.1 on top of Debian Wheezy. The server I am monitoring is also Debian Wheezy.
The command configuration (check_iptables.cfg) is defined as follows.
define command{
command_name check_iptables
command_line /usr/lib/nagios/plugins/check_iptables.sh -T '$ARG1$' -r '$ARG2$'
}
The check is being called using the following
define service{
use generic-service
host_name DNS-SRVR-02
service_description IPTables
check_command check_iptables!INPUT!103
}
The result I am receiving is "Usage: /usr/lib/nagios/check_iptables.sh -T <table> -r <min rules>. I am able to run this command from the command line as the nagios user without any problem.
What am I missing?
Thank you in advance for your assistance, and I hope everyone has a happy new year.
Jay
check_iptables
Re: check_iptables
Just for testing purposes, is the following plugin the one that you are using?
http://exchange.nagios.org/directory/Pl ... es/details
http://exchange.nagios.org/directory/Pl ... es/details
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.
Re: check_iptables
Yes, that is the plugin I am using. As a test, I gave the nagios user permission to run the plugin using sudoers. I am able to run the plugin from the command line on the server being monitored, while logged is as the nagios user. However, when the command is run from the monitoring station, I receive the error.
I am at a loss at this point.
Thank you for your help.
I am at a loss at this point.
Thank you for your help.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_iptables
Well, what are the differences between what you are running on the remote system, and on the Nagios server? The output you are seeing is not a specific critical error, it's simply telling you that you defined the command, or service definition as the options you specified are not valid. Can you show us an example of how you are running this on the nagios command line, as well as the output? That will likely point to the problem.
Re: check_iptables
I am sorry for the delay in posting back. You got me on the right track. I had specified the command incorrectly on the remote server. Apparently I cannot copy and paste very well.
Thank you for your help.
Thank you for your help.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_iptables
Excellent!