Alerting Not Running

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
34Bearman
Posts: 40
Joined: Wed Dec 03, 2014 3:45 pm

Alerting Not Running

Post by 34Bearman »

I have two alerts setup in Nagios Log Server to run every 5 minutes (5m). However they don't appear to run by themselves as their last execution date shown is when I ran them manually. Crond is started on the backend. What should I look at from here?
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Alerting Not Running

Post by lgroschen »

Can you post a screenshot of the alerts page? Also did you check the "alert only when critical/warning threshold is met" check box in the alert creation modal?
/Luke
34Bearman
Posts: 40
Joined: Wed Dec 03, 2014 3:45 pm

Re: Alerting Not Running

Post by 34Bearman »

Yes, Only alert when Warning or Critical threshold is met was checked when I created the alerts. Thresholds were set at 1 for both warning and critical.

Alert Dashboard.jpg
Alert Dashboard.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Alerting Not Running

Post by lgroschen »

Navigate to Administration > Audit Reports

In the table it should show the cron jobs that run on Nagios Log Server. Look for the Alert job- there should be a job run every 20 seconds so it will be very visible. If there aren't any alert jobs in the table at all you might have an issue with the jobs not running correctly.
/Luke
34Bearman
Posts: 40
Joined: Wed Dec 03, 2014 3:45 pm

Re: Alerting Not Running

Post by 34Bearman »

The job does not exist in the Audit report. How do I go about recreating that job or rescheduling it to run?

Thanks for your help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Alerting Not Running

Post by scottwilkerson »

Could you run the following from the CLI on your log server and post the output to verify it is missing

Code: Select all

curl -XGET 'http://localhost:9200/nagioslogserver/commands/_search?pretty&q=command:run_alerts' 

Thanks!
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Alerting Not Running

Post by scottwilkerson »

If the hits comes back as

Code: Select all

"hits" : {
    "total" : 0,
    "max_score" : null,
    "hits" : [ ]
  }
Run the following

Code: Select all

curl -XPUT 'http://localhost:9200/nagioslogserver/commands/run_all_alerts' -d '{"command":"run_alerts","run_time":1,"frequency":20,"node":"global","type":"system","status":"waiting","active":1}'
Last edited by scottwilkerson on Tue Dec 23, 2014 3:07 pm, edited 1 time in total.
Reason: modified the addition command, was missing the active:1 status:waiting
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
34Bearman
Posts: 40
Joined: Wed Dec 03, 2014 3:45 pm

Re: Alerting Not Running

Post by 34Bearman »

Here's what I received:

[root@localhost ~]# curl -XGET 'http://localhost:9200/nagioslogserver/c ... run_alerts'
{
"took" : 8,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 4.020425,
"hits" : [ {
"_index" : "nagioslogserver",
"_type" : "commands",
"_id" : "Y3G0RalSQgiYRVX1QkxiZA",
"_score" : 4.020425,
"_source":{"created":"2014-11-26 10:52:15","active":1,"status":"running","type":"system","node":"global","command":"run_alerts","run_time":1418854926,"frequency":"20","last_run_time":"2014-12-17 17:21:46","last_run_status":"SUCCESS"}
} ]
}
}
34Bearman
Posts: 40
Joined: Wed Dec 03, 2014 3:45 pm

Re: Alerting Not Running

Post by 34Bearman »

I ran the command above and alerts are now functioning. Thanks for your help!
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Alerting Not Running

Post by cmerchant »

Great! We'll go ahead and close this thread. Thanks.
Locked