Alerting Not Running
Alerting Not Running
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?
Re: Alerting Not Running
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
Re: Alerting Not Running
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.
You do not have the required permissions to view the files attached to this post.
Re: Alerting Not Running
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.
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
Re: Alerting Not Running
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.
Thanks for your help.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Alerting Not Running
Could you run the following from the CLI on your log server and post the output to verify it is missing
Thanks!
Code: Select all
curl -XGET 'http://localhost:9200/nagioslogserver/commands/_search?pretty&q=command:run_alerts'
Thanks!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Alerting Not Running
If the hits comes back as
Run the following
Code: Select all
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
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
Reason: modified the addition command, was missing the active:1 status:waiting
Re: Alerting Not Running
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"}
} ]
}
}
[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"}
} ]
}
}
Re: Alerting Not Running
I ran the command above and alerts are now functioning. Thanks for your help!
Re: Alerting Not Running
Great! We'll go ahead and close this thread. Thanks.