Nagios_Nrpe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
techtuga
Posts: 5
Joined: Thu Jan 14, 2016 10:38 am

Re: Nagios_Nrpe

Post by techtuga »

The certificate´s subject CN is different then -H Hostname.

That´s why it is failing with the error message:

Code: Select all

TLS: hostname does not match CN in peer certificate
We already know this is a security thread, anyway by creating the file ~./ldaprc in the nagios user environment files with:

Code: Select all

TLS_REQCERT     never
He ignores the differences and gives the right output in the command line, but not on the Nagios portal.

I think that the ~./ldaprc is not loaded with nagios user environment variables. Thus failing on the portal output.

Is there a config file where we define which user environment files are loaded with the portal?

Thanks for the help,
Fred
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Nagios_Nrpe

Post by mbellerue »

techtuga wrote: I think that the ~./ldaprc is not loaded with nagios user environment variables. Thus failing on the portal output.
That's likely it. We can confirm it by running the following commands,

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_nrpe -H <hostaddress> -p 6666 -t 30 -c check_ldap6 --v2-packets-only
The nagios user doesn't have a home directory, so no ldaprc. You can create one for the nagios user, and then add the ldaprc file for it to parse.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
techtuga
Posts: 5
Joined: Thu Jan 14, 2016 10:38 am

Re: Nagios_Nrpe

Post by techtuga »

Hi,

Topic can be closed, added the .ldaprc file to the application root directory and restarted the services.
File got parsed and the checks are also working on the Nagios Portal now.

There is a difference between the users home directory and the Nagios applications home directory:

Code: Select all

Users Home directory:
/export/home/winnagio

Code: Select all

Applications Root Directory:
/omd/sites/winnagio

Code: Select all

ls -ltra:
winnagio@xxxxxxxxxxxx:/omd/sites/winnagio> ls -ltra
total 52
lrwxrwxrwx  1 winnagio winnagio   32 Jun 12 16:16 version -> ../../versions/3.10-labs-edition
lrwxrwxrwx  1 winnagio winnagio   13 Jun 12 16:16 share -> version/share
-rw-r--r--  1 winnagio winnagio 1265 Jun 12 16:16 .profile
-rw-r--r--  1 winnagio winnagio 4020 Jun 12 16:16 .my.cnf
-rw-r--r--  1 winnagio winnagio   61 Jun 12 16:16 .modulebuildrc
lrwxrwxrwx  1 winnagio winnagio   11 Jun 12 16:16 lib -> version/lib
-rw-r--r--  1 winnagio winnagio  809 Jun 12 16:16 .j4p
lrwxrwxrwx  1 winnagio winnagio   15 Jun 12 16:16 include -> version/include
-rw-r--r--  1 winnagio winnagio  566 Jun 12 16:16 .gitignore
lrwxrwxrwx  1 winnagio winnagio   11 Jun 12 16:16 bin -> version/bin
-rw-r--r--  1 winnagio winnagio 1683 Jun 12 16:16 .bashrc
drwxr-xr-x  1 root     root       16 Jun 12 16:16 ..
drwxr-xr-x  1 winnagio winnagio   22 Jun 12 16:16 local
-rw-------  1 winnagio winnagio 1024 Jun 12 16:16 .rnd
drwxr-xr-x  1 winnagio winnagio   20 Jul  9 22:01 .cache
drwxr-xr-x  1 winnagio winnagio  192 Oct 29 14:09 var
drwxr-xr-x  1 winnagio winnagio  848 Oct 29 14:09 etc
-rw-r--r--  1 winnagio winnagio  286 Nov 25 15:26 .ldaprc
drwxr-xr-x  1 winnagio winnagio  212 Nov 25 15:26 .
drwxr-xr-x 13 winnagio winnagio  300 Nov 25 15:48 tmp
Thanks for the support.
Fred
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios_Nrpe

Post by scottwilkerson »

techtuga wrote:Hi,

Topic can be closed, added the .ldaprc file to the application root directory and restarted the services.
File got parsed and the checks are also working on the Nagios Portal now.

There is a difference between the users home directory and the Nagios applications home directory:

Code: Select all

Users Home directory:
/export/home/winnagio

Code: Select all

Applications Root Directory:
/omd/sites/winnagio

Code: Select all

ls -ltra:
winnagio@xxxxxxxxxxxx:/omd/sites/winnagio> ls -ltra
total 52
lrwxrwxrwx  1 winnagio winnagio   32 Jun 12 16:16 version -> ../../versions/3.10-labs-edition
lrwxrwxrwx  1 winnagio winnagio   13 Jun 12 16:16 share -> version/share
-rw-r--r--  1 winnagio winnagio 1265 Jun 12 16:16 .profile
-rw-r--r--  1 winnagio winnagio 4020 Jun 12 16:16 .my.cnf
-rw-r--r--  1 winnagio winnagio   61 Jun 12 16:16 .modulebuildrc
lrwxrwxrwx  1 winnagio winnagio   11 Jun 12 16:16 lib -> version/lib
-rw-r--r--  1 winnagio winnagio  809 Jun 12 16:16 .j4p
lrwxrwxrwx  1 winnagio winnagio   15 Jun 12 16:16 include -> version/include
-rw-r--r--  1 winnagio winnagio  566 Jun 12 16:16 .gitignore
lrwxrwxrwx  1 winnagio winnagio   11 Jun 12 16:16 bin -> version/bin
-rw-r--r--  1 winnagio winnagio 1683 Jun 12 16:16 .bashrc
drwxr-xr-x  1 root     root       16 Jun 12 16:16 ..
drwxr-xr-x  1 winnagio winnagio   22 Jun 12 16:16 local
-rw-------  1 winnagio winnagio 1024 Jun 12 16:16 .rnd
drwxr-xr-x  1 winnagio winnagio   20 Jul  9 22:01 .cache
drwxr-xr-x  1 winnagio winnagio  192 Oct 29 14:09 var
drwxr-xr-x  1 winnagio winnagio  848 Oct 29 14:09 etc
-rw-r--r--  1 winnagio winnagio  286 Nov 25 15:26 .ldaprc
drwxr-xr-x  1 winnagio winnagio  212 Nov 25 15:26 .
drwxr-xr-x 13 winnagio winnagio  300 Nov 25 15:48 tmp
Thanks for the support.
Fred
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked