Page 3 of 3
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 12:24 pm
by haile711
This is after i've scheduled the report.
Code: Select all
[root@MAxxxx automation]# crontab -u apache -l
#crontab for apache user
0 9 * * * /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=g7h6ss --username=nagiosadmin > /dev/null 2>&1
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 1:45 pm
by lmiltchev
OK, so the scheduled reports are added to the apache crontab, which is a good news.
Can you go to the "Auto-Discovery Jobs" page, click on the "Edit job" actions button, modify the "Frequency" and "Time", and click on Submit?
Next, run the following commands and show the output:
Code: Select all
crontab -u apache -l
tail -50 /var/log/httpd/error_log
nmap -V
grep COMPONENT_VERSION /usr/local/nagiosxi/html/includes/components/autodiscovery/autodiscovery.inc.php
ll /usr/local/nagiosxi/html/includes/components/autodiscovery/
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 1:55 pm
by haile711
Here are the output from the following commands. and the ss of the reschedule for the jobs
Code: Select all
[root@Maxxx automation]# crontab -u apache -l
#crontab for apache user
0 9 * * * /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=g7h6ss --username=nagiosadmin > /dev/null 2>&1
[root@Maxxx automation]# tail -50 /var/log/httpd/error_log
[Sun Dec 06 03:21:03 2015] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 06 03:21:03 2015] [notice] Digest: done
[Sun Dec 06 03:21:03 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Sun Dec 06 06:06:12 2015] [error] [client 11.248.10.63] PHP Notice: Undefined variable: count in /usr/local/nagiosxi/html/includes/components/tracerouteaction/traceroute.php on line 61, referer: http://11.72.52.181/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=ma100mlvnav051
"-":5: bad hour
errors in crontab file, can't install.
"-":5: bad hour
errors in crontab file, can't install.
"-":5: bad hour
errors in crontab file, can't install.
[Mon Dec 07 12:22:10 2015] [error] [client ::1] PHP Notice: Undefined index: language in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 710
[Mon Dec 07 12:22:10 2015] [error] [client ::1] PHP Notice: Undefined index: language in /usr/local/nagiosxi/html/includes/components/ccm/includes/common_functions.inc.php on line 711
[Tue Dec 08 03:09:03 2015] [notice] SIGHUP received. Attempting to restart
httpd: Could not reliably determine the server's fully qualified domain name, using 10.83.52.181 for ServerName
[Tue Dec 08 03:09:03 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Dec 08 03:09:03 2015] [notice] Digest: done
[Tue Dec 08 03:09:03 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
"-":6: bad hour
errors in crontab file, can't install.
[root@Maxxx automation]# nmap -V
Nmap version 6.47 ( http://nmap.org )
Platform: x86_64-redhat-linux-gnu
Compiled with: liblua-5.2.3 openssl-1.0.1i nmap-libpcre-7.6 nmap-libpcap-1.2.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
[root@Maxxx automation]# grep COMPONENT_VERSION /usr/local/nagiosxi/html/includes/components/autodiscovery/autodiscovery.inc.php
COMPONENT_VERSION => '2.0.6',
[root@Maxxx automation]# ll /usr/local/nagiosxi/html/includes/components/autodiscovery/
total 84
-rw-r--r-- 1 apache nagios 13952 Oct 7 13:53 autodiscovery.inc.php
-rw-r--r-- 1 apache nagios 1279 Oct 7 13:53 CHANGES.TXT
drwxr-xr-x 2 apache nagios 4096 Oct 7 13:53 images
-rw-r--r-- 1 apache nagios 39777 Oct 7 13:53 index.php
-rw-r--r-- 1 apache nagios 521 Oct 7 13:53 install.sh
drwxrwsr-x 2 apache nagios 4096 Dec 7 11:27 jobs
-rw-r--r-- 1 apache nagios 1419 Oct 7 13:53 sanity.sh
drwxr-xr-x 2 apache nagios 4096 Oct 7 13:53 scripts
-rw------- 1 root root 0 Nov 20 16:02 setup.done
-rwxr--r-- 1 apache nagios 353 Oct 7 13:53 setup.sh
[root@Maxxx automation]#
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 2:57 pm
by lmiltchev
Let's try changing the permissions of "autodiscovery" directory and files in it to nagios:nagios:
Code: Select all
cd /usr/local/nagiosxi/html/includes/components
chown -R nagios:nagios autodiscovery
Also, make sure apache is added to both, nagios and nagcmd groups.
Modify your auto-discovery job schedule and hit "Submit". See if the job showed up in the apache crontab.
For some reason, you were not able to upgrade the component...
[root@Maxxx automation]# grep COMPONENT_VERSION /usr/local/nagiosxi/html/includes/components/autodiscovery/autodiscovery.inc.php
COMPONENT_VERSION => '2.0.6',
Go to Admin->Manage Components, click on "Check for Updates". You should see Version: 2.2.3 of the Auto-Discovery component available. Upgrade to it.
Also, I noticed the following errors(s) in the apache error log:
"-":6: bad hour
errors in crontab file, can't install.
I am not really sure, where this is coming from. It could be a custom script/cron job not set up properly...
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 4:32 pm
by haile711
Thanks for helping lmiltchev,
I've made all the changes already but the scheduled jobs still didn't show up. I have another Nagios server and it's work over there, and I can't find what's the difference is.
Code: Select all
ls -lrt
total 84
-rwxr--r-- 1 nagios nagios 353 Oct 7 13:53 setup.sh
drwxr-xr-x 2 nagios nagios 4096 Oct 7 13:53 scripts
-rw-r--r-- 1 nagios nagios 1419 Oct 7 13:53 sanity.sh
-rw-r--r-- 1 nagios nagios 521 Oct 7 13:53 install.sh
-rw-r--r-- 1 nagios nagios 39777 Oct 7 13:53 index.php
drwxr-xr-x 2 nagios nagios 4096 Oct 7 13:53 images
-rw-r--r-- 1 nagios nagios 1279 Oct 7 13:53 CHANGES.TXT
-rw-r--r-- 1 nagios nagios 13952 Oct 7 13:53 autodiscovery.inc.php
-rw------- 1 nagios nagios 0 Nov 20 16:02 setup.done
drwxrwsr-x 2 nagios nagios 4096 Dec 7 11:27 jobs
[root@MA100DLVMON812 autodiscovery]# crontab -u apache -l
#crontab for apache user
0 9 * * * /usr/bin/php /usr/local/nagiosxi/html/includes/components/scheduledreporting/sendreport.php --report=g7h6ss --username=nagiosadmin > /dev/null 2>&1
[root@MAxxx autodiscovery]# crontab -u apache -l
#crontab for apache user
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 5:00 pm
by lmiltchev
Is opening a support ticket to our email ticketing system an option for you? We may need to schedule a remote session to further troubleshoot this issue.
Send us an email at
[email protected]. Type "Re: Autodiscovery Questions" in the email's subject field, and provide URL link to this post in the email's body. Thanks!
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 5:04 pm
by haile711
Hey we did that one time,
I dunno how many times we can open a remote session. I don't want to burn all of my supports session. Please let me know if this is the case.
Re: Autodiscovery Questions
Posted: Thu Dec 10, 2015 6:02 pm
by lmiltchev
haile711, I sent you a PM.
Re: Autodiscovery Questions
Posted: Fri Dec 11, 2015 8:53 am
by haile711
good morning lmiltchev, i've sent an email. Thanks you for your response
Re: Autodiscovery Questions
Posted: Fri Dec 11, 2015 10:11 am
by lmiltchev
You opened an new support ticket in our email ticketing system. We will continue communicating via emails. I am locking this topic.