I'm running the latest Nagios 5.6.5 and when I try to create an Auto-Discovery job it keeps just spinning under the status. I'm only scanning one target IP so it should be quick but it just never finishes.
I looked into the Nagios logs and couldn't see anything regarding the auto-discovery failing. Does anyone know what's happening? There doesn't seem to be much in the board about this besides reinstalling with an old custom auto-discovery(breaks the current auto-discovery). Is there any way to figure out from the logs what's happening?
I'm about to try and look into the php code to see what it looks to be doing but I tried just using 1 IP address, refreshing the job list, restarting nagios, recreating the auto-discovery job, and even removing the component and reinstalling it.
Auto Discovery Job Keeps Spinning
Re: Auto Discovery Job Keeps Spinning
Hmm it seems I was able to get the jobs working and showing up again after changing the permission to group writable.
Why would it require
group writable if it's owned by the nagios user?
I checked on my other test instance(with a new install of nagios) and the permissions were set to
so is that the correct permissions?
Why would it require
Code: Select all
drwxrwxr-x. 2 nagios nagios 4096 Aug 9 14:47 jobsI checked on my other test instance(with a new install of nagios) and the permissions were set to
Code: Select all
drwxrwx---. 2 nagios nagios 4096 Aug 9 14:45 jobsRe: Auto Discovery Job Keeps Spinning
Please run this command:
What is the output of these commands?
Code: Select all
chmod 0776 /usr/local/nagiosxi/html/includes/components/autodiscovery/jobsCode: Select all
chage -l apache
chage -l nagios
grep nag /etc/group
grep "User \|Group " /etc/httpd/conf/httpd.conf
ls -ld /usr/local/nagiosxi/html/includes/components/autodiscovery
ls -l /usr/local/nagiosxi/html/includes/components/autodiscovery
ls -l /usr/local/nagiosxi/html/includes/components/autodiscovery/jobsRe: Auto Discovery Job Keeps Spinning
Code: Select all
[root@reslnnagios02 autodiscovery]# chage -l apache
Last password change : Mar 05, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
[root@reslnnagios02 autodiscovery]# chage -l nagios
Last password change : Mar 05, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
[root@reslnnagios02 autodiscovery]# grep nag /etc/group
nagios:x:1001:nagios,apache,snmptt,nrpe
nagcmd:x:1002:nagios,apache,snmptt
[root@reslnnagios02 autodiscovery]# grep "User \|Group " /etc/httpd/conf/httpd.conf
User apache
Group apache
[root@reslnnagios02 autodiscovery]# ls -ld /usr/local/nagiosxi/html/includes/components/autodiscovery
drwxr-xr-x. 5 nagios nagios 4096 Aug 9 14:41 /usr/local/nagiosxi/html/includes/components/autodiscovery
[root@reslnnagios02 autodiscovery]# ls -l /usr/local/nagiosxi/html/includes/components/autodiscovery
total 64
-rwxr-xr-x. 1 nagios nagios 12569 Aug 9 14:41 autodiscovery.inc.php
-rwxr-xr-x. 1 nagios nagios 2329 Mar 5 14:20 CHANGES.TXT
drwxr-xr-x. 2 nagios nagios 30 Jan 2 2019 images
-rwxr-xr-x. 1 nagios nagios 38385 Aug 9 14:39 index.php
drwxrwxr-x. 2 nagios nagios 4096 Aug 9 15:04 jobs
drwxr-xr-x. 2 nagios nagios 33 Aug 9 14:34 scripts
[root@reslnnagios02 autodiscovery]# ls -l /usr/local/nagiosxi/html/includes/components/autodiscovery/jobs
total 11296
-rwxr-xr-x. 1 nagios nagios 210286 Jan 3 2019 5G290L.out
-rwxr-xr-x. 1 nagios nagios 0 Jan 3 2019 5G290L.watch
-rwxr-xr-x. 1 nagios nagios 70706 Jan 3 2019 5G290L.xmlRe: Auto Discovery Job Keeps Spinning
That looks to be the case, try doing another and see if it finishes.
Re: Auto Discovery Job Keeps Spinning
That looks to be the issue, auto-discovery is working now thanks!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Auto Discovery Job Keeps Spinning
Great!hul1 wrote:That looks to be the issue, auto-discovery is working now thanks!
Locking