Scheduled 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
sgiworks
Posts: 197
Joined: Mon Mar 21, 2016 11:38 am

Scheduled Alerting Not Running

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Scheduled Alerting Not Running

Post 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?
Former Nagios employee
https://www.mcapra.com/
sgiworks
Posts: 197
Joined: Mon Mar 21, 2016 11:38 am

Re: Scheduled Alerting Not Running

Post 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 ~]#
sgiworks
Posts: 197
Joined: Mon Mar 21, 2016 11:38 am

Re: Scheduled Alerting Not Running

Post by sgiworks »

We now see the scheduled alerts coming through. Can we know what was the problem?

Thanks for your help.

Regards,
Swapnil
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Scheduled Alerting Not Running

Post 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.
Former Nagios employee
https://www.mcapra.com/
Locked