Configuration of check_ipsec

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
swapnil.kadam
Posts: 48
Joined: Fri Dec 05, 2014 10:38 am

Configuration of check_ipsec

Post by swapnil.kadam »

Hello,

I am trying to setup a configuration to checks vpn connection status of an openswan instance.

I have imported the plugin from https://exchange.nagios.org/directory/P ... ec/details and amended the /etc/sudoers with following lines:

Cmnd_Alias IPSEC = /usr/lib/nagios/plugins/check_ipsec
nagios ALL=NOPASSWD:IPSEC

Now when I create a command definition and applied [Command Definition.JPG]
Secondly created a service and added the command [Monitoring Services Check Command.JPG]
Final step, tried to test by running the command. However it throws an error: [Error on testing command.JPG]
OUTPUT: CRITICAL - /usr/sbin/ipsec not exist
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Configuration of check_ipsec

Post by Box293 »

Before you decided to create the command and service, did you test this from the command line first?

On a separate note, I can see you are running into a problem which can lead to the issues you are having.

The problem is the use of the "Test Check Command" button. Due to how PHP runs these commands as the user apache, the "Test Check Command" may not work in these situations and should be ignored.

So for all further testing of this service you need to:

Make the changes to the service
Save the Service
Apply Configuration
Go back to the home screen and find the Service
When viewing the Service Status Details page click the Schedule a forced immediate check link

Just to re-iterate, for all further testing for this service DO NOT use the "Test Check Command" button, follow the steps above.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
swapnil.kadam
Posts: 48
Joined: Fri Dec 05, 2014 10:38 am

Re: Configuration of check_ipsec

Post by swapnil.kadam »

I did follow the steps you recommended, however the Service Status is "CRITICAL - /usr/sbin/ipsec not exist"
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Configuration of check_ipsec

Post by hsmith »

Looks like you'll have to install one of these packages:

Code: Select all

[root@XI5 rsyslog-8.17.0]# yum provides */ipsec
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.umflint.edu
 * epel: mirror.nexcess.net
 * extras: mirror.cs.uwp.edu
 * rpmforge: mirror.nexcess.net
 * updates: mirror.tzulo.com
base/filelists_db                                                                                                                                                          | 6.3 MB     00:01
cr/filelists_db                                                                                                                                                            |  586 B     00:00
epel/filelists_db                                                                                                                                                          | 7.9 MB     00:03
extras/filelists_db                                                                                                                                                        |  37 kB     00:00
nagios-base/filelists                                                                                                                                                      | 376 kB     00:00
nagiosxi-deps/filelists                                                                                                                                                    |  15 kB     00:00
rpmforge/filelists_db                                                                                                                                                      | 2.3 MB     00:00
rsyslog_v8/filelists_db                                                                                                                                                    | 180 kB     00:00
updates/filelists_db                                                                                                                                                       | 3.0 MB     00:00
openswan-2.6.32-37.el6.x86_64 : IPSEC implementation with IKEv1 and IKEv2 keying protocols
Repo        : base
Matched from:
Filename    : /usr/libexec/ipsec
Filename    : /usr/sbin/ipsec
Filename    : /etc/rc.d/init.d/ipsec



libreswan-3.13-1.el6.x86_64 : IPsec implementation with IKEv1 and IKEv2 keying protocols
Repo        : epel
Matched from:
Filename    : /usr/libexec/ipsec
Filename    : /usr/sbin/ipsec
Filename    : /etc/rc.d/init.d/ipsec
Former Nagios Employee.
me.
Locked