Show Alert in Dashboard not working

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
OptimusB
Posts: 146
Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:

Show Alert in Dashboard not working

Post by OptimusB »

I am an alert setup based on a query. The alerting is working and I am able to get the alerts in XI via NRDP. However when I click on the "show alert in dashboard", it is not showing the dashboard with all the filters. It only shows the time filter? Please advise.

The filtering after clicking on "show alert in dashboard"
logsearch.JPG
This is the saved query that I based the alert on
demo.JPG
The alert dashboard showing the error/warning
warning.JPG
You do not have the required permissions to view the files attached to this post.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

The symptoms are the same on my lab machine. I will do additional testing and update once more letting you know the status of this potential bug. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

I upgraded my lab box to the latest revision and this worked properly. I went through our revision history and found:
Fix load query when clicking through an alert -JO
This bug has been fixed in our latest revision. When the next version of Nagios Log Server is released, please upgrade to it, which will fix this problem. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
OptimusB
Posts: 146
Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:

Re: Show Alert in Dashboard not working

Post by OptimusB »

OK Thanks. Is there an ETA when will that be available?

I also noticed that even though the Check interval was set to 5mins, it was not refreshing or checking. So it is still saying warning right now. When I clicked on Run the alert now, then it turned back to green. Is something stuck and it is not checking within LS?
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

Regarding the ETA: I am not aware of a release date.

Alerts are picked up by an internal cronjob. Please tail the following log:

Code: Select all

tail -f /usr/local/nagioslogserver/var/jobs.log
Please note that you will have to run this tail on every node in your cluster, as 'global jobs' are only picked up on one node.
Also note that you need to keep this tail following, since jobs.log is truncated often.

You should see a command called 'run_alerts' happen roughly once per minute. Let us know if you do not. It will look something like this:

Code: Select all

Running command run_alerts with args ' ' for job id: run_all_alerts
If you force the run_all_alerts job from the 'command subsystem' what do you see in jobs.log? Does it change? If you run the alert manually from the 'alerts' page, does it affect jobs.log?

Let us know. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

OptimusB,

I spoke with the developers about this case - they have supplied me with a file to correct this issue.
Download the attached file and extract 'logserver.js'.
Login to each node in your NLS cluster, and move the existing /var/www/html/nagioslogserver/www/app/dashboards/logserver.js to some place safe:

Code: Select all

mv /var/www/html/nagioslogserver/www/app/dashboards/logserver.js /root/backup
Place the new 'logserver.js' file in /var/www/html/nagioslogserver/www/app/dashboards/ on each node in your cluster. You may have to restart httpd:

Code: Select all

service httpd restart
Once this is complete, please log in to your NLS web GUI and attempt to access your query through the 'Alerts' tab. You may have to clear out your cache for the change to take.

Thanks, let me know if the above works for you!
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
OptimusB
Posts: 146
Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:

Re: Show Alert in Dashboard not working

Post by OptimusB »

I have replaced the logserver.js file on both nodes and the "show alert in dashboard" is now working.

However, keeping an eye on jobs.log, doesn't seem like anything is running.

I just get this on both nodes...

Code: Select all

Processed 0 node jobs.
Processed 0 global jobs.
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
Here's what the Cron log looks like

Code: Select all

Mar 25 08:34:01 kdcbchngols01 CROND[29871]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php jobs > /usr/local/nagioslogserver/var/jobs.log 2>&1)
Mar 25 08:34:01 kdcbchngols01 CROND[29870]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php poller > /usr/local/nagioslogserver/var/poller.log 2>&1)
Mar 25 08:35:01 kdcbchngols01 CROND[29965]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php poller > /usr/local/nagioslogserver/var/poller.log 2>&1)
Mar 25 08:35:01 kdcbchngols01 CROND[29967]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php jobs > /usr/local/nagioslogserver/var/jobs.log 2>&1)
Mar 25 08:36:01 kdcbchngols01 CROND[30060]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php jobs > /usr/local/nagioslogserver/var/jobs.log 2>&1)
Mar 25 08:36:01 kdcbchngols01 CROND[30062]: (nagios) CMD (/usr/bin/php -q /var/www/html/nagioslogserver/www/index.php poller > /usr/local/nagioslogserver/var/poller.log 2>&1)
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

Your cron log looks fine - poller and jobs are executing every minute. Did you try to force any jobs while you were tailing jobs.log? Were you sure to tail it on every node in your cluster?

Are your backups working properly? Backup are initiated in a similar way to alerts, it would be strange if alerts were not working and backups were.

Let me know. Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
OptimusB
Posts: 146
Joined: Mon Oct 27, 2014 10:08 pm
Location: Canada
Contact:

Re: Show Alert in Dashboard not working

Post by OptimusB »

I am tailing both nodes and so far nothing.... I saw this...

Code: Select all

Running command cleanup with args ' ' for job id: cleanup_cmdsubsys
SUCCESS
Processed 0 node jobs.
Processed 1 global jobs.
However when I click on "run this alert now", nothing shows on the job.log file. Backups are running fine. I just ran one manually and got this entry.

Code: Select all

Running command do_backups with args ' ' for job id: backups
SUCCESS
Processed 0 node jobs.
Processed 1 global jobs.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Show Alert in Dashboard not working

Post by jolson »

Could you please navigate to NLS > Administration > Command Subsystem and initiate the 'Reset All Jobs' command? After this, try tailing jobs.log on both nodes and forcing a 'run_all_alerts' command from the GUI. Perhaps something got messed up when your NLS storage ran out - resetting your jobs could help fix this problem.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked