Page 3 of 3
Re: Nagios_Nrpe
Posted: Thu Nov 21, 2019 7:42 am
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:
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
Re: Nagios_Nrpe
Posted: Thu Nov 21, 2019 2:33 pm
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.
Re: Nagios_Nrpe
Posted: Mon Nov 25, 2019 9:57 am
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
Re: Nagios_Nrpe
Posted: Mon Nov 25, 2019 11:20 am
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