Page 1 of 1

Scheduled Alerting Not Running

Posted: Mon Feb 13, 2017 9:51 am
by sgiworks
Hello Team,

We have setup a alert in Nagios Log Server, when we run manually it runs. However it doesn't run with scheduled action. We have read the forum thread https://support.nagios.com/forum/viewto ... 37&t=30652 but would like to know more on the output we received for the recommended command.

***************************************************************************************
[root@Hostname ~]# curl -XGET 'http://localhost:9200/nagioslogserver/c ... run_alerts'
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}

***************************************************************************************

Attached alert settings for your reference.

Regards,
Swapnil

Re: Scheduled Alerting Not Running

Posted: Mon Feb 13, 2017 10:35 am
by mcapra
Can you try running the following command:

Code: Select all

curl -XPUT 'http://localhost:9200/nagioslogserver/commands/run_all_alerts' -d '{"created":"2017-02-13 00:00:00","created_by":"1","active":1,"status":"waiting","type":"system","node":"global","command":"run_alerts","run_time":1,"frequency":"20","last_run_time":"1970-01-01 00:00:00","last_run_status":"SUCCESS"}'
And see if that fixes the alerts?

Re: Scheduled Alerting Not Running

Posted: Mon Feb 13, 2017 10:57 am
by sgiworks
Does the command output

[root@hostname ~]# curl -XPUT 'http://localhost:9200/nagioslogserver/c ... all_alerts' -d '{"created":"2017-02-1300:00:00","created_by":"1","active":1,"status":"waiting","type":"system","node":"global","command":"run_alerts","run_time":1,"frequency":"20","last_run_time":"1970-01-0100:00:00","last_run_status":"SUCCESS"}'
{"_index":"nagioslogserver","_type":"commands","_id":"run_all_alerts","_version"
[root@hostname ~]#

Re: Scheduled Alerting Not Running

Posted: Mon Feb 13, 2017 11:23 am
by sgiworks
We now see the scheduled alerts coming through. Can we know what was the problem?

Thanks for your help.

Regards,
Swapnil

Re: Scheduled Alerting Not Running

Posted: Mon Feb 13, 2017 11:59 am
by mcapra
Hard to say for sure, but it looks like one of the scheduled command subsystem jobs, specifically the one that handles running alerts, was removed from this system. The first command you ran identified the problem, and the command I provided re-created the alerts job.