Nagios XI 5.5.2 with modgearman ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

Hi ,

I used the Nagios Repo ( https://repo.nagios.com/?repo=rpm-rhel ) to install NagiosXI.

When I try installing Mod Gearman in Nagios XI 5.5.2 server I get the below error :

ERROR: The version of Nagios Core you're using is incompatible with ModGearman

Does modgearman not work with Nagios XI 5.5.2 ?

Regards,
Vish.
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

Looks like I ran into this issue : https://github.com/sni/mod_gearman/issues/136

How can I revert only Nagios core from 4.4.1 to 4.2.4 ?

Kindly respond on priority, as this is holding up our NagiosXI Production build.

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by lmiltchev »

You can follow the steps, outlined in the KB article below:

https://support.nagios.com/kb/article/n ... e-823.html

Important: Please make sure that you are downloading the xi-5.4.13.tar.gz tarball as it's shown in the article, NOT the latest!

Let us know if this worked for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

Thanks lmiltchev

Will try it out.

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by lmiltchev »

Sure, let us know how it went. We will keep this thread open for the time being. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

modgearman is working now !!!

But am seeing a different issue now.
None of the crons seem to be running from /etc/cron.d/nagiosxi

Due to which , Only Monitoring Engine, Performance Grapher,Database Backend are GREEN under XI System Component Status
Rest all are showing RED.

I see that crond is running and even tried rebooting.

Any pointers here ?

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by lmiltchev »

This must be a unrelated issue to downgrading Nagios Core. Have you tried restarting crond?

Code: Select all

service crond restart 
Run the command above, then run the following commands and show the output in code wraps:

Code: Select all

ps -ef | grep cron | grep -v grep
tail -50 /var/log/cron
chage nagios -l
service crond status
service nagios status
service ndo2db status
service gearmand status
service mod-gearman2-worker status
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

I noticed a issue with gearmand, however gearman_top2 seems to show the correct output.

Below are the outputs for the commands :
service crond restart
Redirecting to /bin/systemctl restart crond.service

ps -ef | grep cron | grep -v grep
root 22738 1 0 09:04 ? 00:00:00 /usr/sbin/crond -n

tail -50 /var/log/cron
Aug 22 09:04:45 ausulnxipwb01 crond[3501]: (CRON) INFO (Shutting down)
Aug 22 09:04:45 ausulnxipwb01 crond[22711]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 64% if used.)
Aug 22 09:04:45 ausulnxipwb01 crond[22711]: (CRON) INFO (running with inotify support)
Aug 22 09:04:45 ausulnxipwb01 crond[22711]: (CRON) INFO (@reboot jobs will be run at computer's startup.)
Aug 22 09:04:56 ausulnxipwb01 crond[22711]: (CRON) INFO (Shutting down)
Aug 22 09:04:56 ausulnxipwb01 crond[22738]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 36% if used.)
Aug 22 09:04:56 ausulnxipwb01 crond[22738]: (CRON) INFO (running with inotify support)
Aug 22 09:04:56 ausulnxipwb01 crond[22738]: (CRON) INFO (@reboot jobs will be run at computer's startup.)


chage nagios -l
Last password change : Aug 20, 2018
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

service crond status
Redirecting to /bin/systemctl status -l crond.service
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-08-22 09:04:56 CDT; 2min 53s ago
Main PID: 22738 (crond)
CGroup: /system.slice/crond.service
└─22738 /usr/sbin/crond -n

Aug 22 09:04:56 ausulnxipwb01.us.dell.com systemd[1]: Started Command Scheduler.
Aug 22 09:04:56 ausulnxipwb01.us.dell.com systemd[1]: Starting Command Scheduler...
Aug 22 09:04:56 ausulnxipwb01.us.dell.com crond[22738]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 36% if used.)
Aug 22 09:04:56 ausulnxipwb01.us.dell.com crond[22738]: (CRON) INFO (running with inotify support)
Aug 22 09:04:56 ausulnxipwb01.us.dell.com crond[22738]: (CRON) INFO (@reboot jobs will be run at computer's startup.)


service nagios status
nagios (pid 3509) is running...

service ndo2db status
Redirecting to /bin/systemctl status ndo2db.service
● ndo2db.service - Nagios Data Out Daemon
Loaded: loaded (/usr/lib/systemd/system/ndo2db.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-08-22 08:06:00 CDT; 1h 2min ago
Docs: http://www.nagios.org/documentation
Main PID: 3502 (ndo2db)
CGroup: /system.slice/ndo2db.service
├─3502 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
├─3522 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f
└─3523 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f

Aug 22 09:07:04 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming timedevents.
Aug 22 09:07:04 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming systemcommands.
Aug 22 09:07:04 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming servicechecks.
Aug 22 09:07:04 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming hostchecks.
Aug 22 09:07:04 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming eventhandlers.
Aug 22 09:08:07 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming timedevents.
Aug 22 09:08:07 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming systemcommands.
Aug 22 09:08:07 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming servicechecks.
Aug 22 09:08:07 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming hostchecks.
Aug 22 09:08:07 ausulnxipwb01.us.dell.com ndo2db[3523]: Trimming eventhandlers.

systemctl status gearmand -l
● gearmand.service - LSB: start and stop the Gearman server
Loaded: loaded (/etc/rc.d/init.d/gearmand; bad; vendor preset: disabled)
Active: activating (start) since Wed 2018-08-22 09:14:38 CDT; 2min 34s ago
Docs: man:systemd-sysv-generator(8)
Process: 24126 ExecStart=/etc/rc.d/init.d/gearmand start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/gearmand.service
└─24134 /usr/sbin/gearmand -d --worker-wakeup=10 --retention-file=/tmp/gearmand.retention -q retention --log-file=/var/log/gearmand/gearmand.log

Aug 22 09:14:38 ausulnxipwb01.us.dell.com systemd[1]: Starting LSB: start and stop the Gearman server...
Aug 22 09:14:38 ausulnxipwb01.us.dell.com runuser[24131]: pam_unix(runuser:session): session opened for user gearmand by (uid=0)
Aug 22 09:14:38 ausulnxipwb01.us.dell.com runuser[24131]: pam_unix(runuser:session): session closed for user gearmand
Aug 22 09:14:38 ausulnxipwb01.us.dell.com gearmand[24126]: Starting gearmand: [ OK ]
Aug 22 09:14:38 ausulnxipwb01.us.dell.com gearmand[24126]: /etc/rc.d/init.d/gearmand: line 43: /var/run/gearmand/gearmand.pid: No such file or directory
Aug 22 09:14:38 ausulnxipwb01.us.dell.com systemd[1]: PID file /var/run/gearmand/gearmand.pid not readable (yet?) after start.


service mod-gearman2-worker status - This has been disabled

gearman_top2

2018-08-22 09:18:04 - localhost:4730 - v0.33

Queue Name | Worker Available | Jobs Waiting | Jobs Running
-----------------------------------------------------------------------------------
check_results | 1 | 0 | 0
eventhandler | 10 | 0 | 0
host | 10 | 0 | 0
service | 10 | 0 | 0
worker_ausulnxipwk01.us.dell.com | 1 | 0 | 0
worker_ausulnxipwk02.us.dell.com | 1 | 0 | 0
-----------------------------------------------------------------------------------
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by lmiltchev »

We will need a little bit more info in order to determine why nagios cron jobs are not running. Can you show the output of the following commands?

Code: Select all

ls -la /etc/cron.d/nagiosxi
cat /etc/cron.d/nagiosxi
grep nagios /var/log/cron | tail -50
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Nagios XI 5.5.2 with modgearman ...

Post by vishfx »

Bewlo are the details:

ls -la /etc/cron.d/nagiosxi
-rw-r--r-- 1 root root 1662 Aug 20 07:45 /etc/cron.d/nagiosxi


cat /etc/cron.d/nagiosxi
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi

# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 7 * * * root /root/scripts/autopostgresqlbackup > /dev/null 2>&1

* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php >> /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php >> /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php >> /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/event_handler.php >> /usr/local/nagiosxi/var/event_handler.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php >> /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php >> /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php >> /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php >> /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php >> /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php >> /usr/local/nagiosxi/var/cleaner.log 2>&1

01 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/recurring_downtime.php >> /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php >> /usr/local/nagiosxi/var/deadpool.log 2>&1

grep nagios /var/log/cron | tail -50
Aug 22 08:07:15 ausulnxipwb01 crontab[15394]: (nagios) AUTH (crontab command not allowed)

date
Wed Aug 22 20:24:55 CDT 2018


Regards,
Vish.
Locked