Alert setup - not automatically run/fire
Alert setup - not automatically run/fire
Hi,
I setup a few alerts. I can run them manually and it runs fine.
However, it has never been run automatically. They all are setup at different Check interval such as 1d interval, 1h interval.
Last Run always show the time I run it manually. I have never seen any of them fire up on its own per Check schedule.
Query for the alerts does produce results and it fires up email when run manually.
Product: Nagios Log Server • 1.4.4
Thank you
I setup a few alerts. I can run them manually and it runs fine.
However, it has never been run automatically. They all are setup at different Check interval such as 1d interval, 1h interval.
Last Run always show the time I run it manually. I have never seen any of them fire up on its own per Check schedule.
Query for the alerts does produce results and it fires up email when run manually.
Product: Nagios Log Server • 1.4.4
Thank you
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Alert setup - not automatically run/fire
What is the output from:
Code: Select all
# curl -XGET 'http://localhost:9200/nagioslogserver_log/_search/?size=20&pretty=1'Previous Nagios employee
Re: Alert setup - not automatically run/fire
Hi,
Here is the result
-----
{
"took" : 67,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 49834,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ1KZAtNgFi-n-vtsk",
"_score" : 1.0,
"_source":{"created":1489713276480,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ1Vf2tNgFi-n-vuHU",
"_score" : 1.0,
"_source":{"created":1489713321973,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ10DYtNgFi-n-vuH1",
"_score" : 1.0,
"_source":{"created":1489713447127,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ2yZHtNgFi-n-vuI1",
"_score" : 1.0,
"_source":{"created":1489713702470,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ3LwgtNgFi-n-vuJQ",
"_score" : 1.0,
"_source":{"created":1489713806367,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ4Y2gtNgFi-n-vuKm",
"_score" : 1.0,
"_source":{"created":1489714122144,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ43aotNgFi-n-vuLF",
"_score" : 1.0,
"_source":{"created":1489714247336,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ5HKFtNgFi-n-vuLW",
"_score" : 1.0,
"_source":{"created":1489714311812,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ5RAttNgFi-n-vuLg",
"_score" : 1.0,
"_source":{"created":1489714352172,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ6ox7tNgFi-n-vuM5",
"_score" : 1.0,
"_source":{"created":1489714711674,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ6-rntNgFi-n-vuNV",
"_score" : 1.0,
"_source":{"created":1489714801383,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7SWwtNgFi-n-vuOD",
"_score" : 1.0,
"_source":{"created":1489714881967,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7XQqtNgFi-n-vuOG",
"_score" : 1.0,
"_source":{"created":1489714902057,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7_lRtNgFi-n-vuPC",
"_score" : 1.0,
"_source":{"created":1489715067216,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8KZrtNgFi-n-vuPM",
"_score" : 1.0,
"_source":{"created":1489715111530,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8PTctNgFi-n-vuPP",
"_score" : 1.0,
"_source":{"created":1489715131611,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8ZJ0tNgFi-n-vuPZ",
"_score" : 1.0,
"_source":{"created":1489715171955,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ9CtMtNgFi-n-vuP7",
"_score" : 1.0,
"_source":{"created":1489715342156,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ9cP3tNgFi-n-vuQa",
"_score" : 1.0,
"_source":{"created":1489715446774,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ-EkhtNgFi-n-vuRD",
"_score" : 1.0,
"_source":{"created":1489715611936,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
} ]
}
}
-----------
Thank you
Here is the result
-----
{
"took" : 67,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 49834,
"max_score" : 1.0,
"hits" : [ {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ1KZAtNgFi-n-vtsk",
"_score" : 1.0,
"_source":{"created":1489713276480,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ1Vf2tNgFi-n-vuHU",
"_score" : 1.0,
"_source":{"created":1489713321973,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ10DYtNgFi-n-vuH1",
"_score" : 1.0,
"_source":{"created":1489713447127,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ2yZHtNgFi-n-vuI1",
"_score" : 1.0,
"_source":{"created":1489713702470,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ3LwgtNgFi-n-vuJQ",
"_score" : 1.0,
"_source":{"created":1489713806367,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ4Y2gtNgFi-n-vuKm",
"_score" : 1.0,
"_source":{"created":1489714122144,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ43aotNgFi-n-vuLF",
"_score" : 1.0,
"_source":{"created":1489714247336,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ5HKFtNgFi-n-vuLW",
"_score" : 1.0,
"_source":{"created":1489714311812,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ5RAttNgFi-n-vuLg",
"_score" : 1.0,
"_source":{"created":1489714352172,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ6ox7tNgFi-n-vuM5",
"_score" : 1.0,
"_source":{"created":1489714711674,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ6-rntNgFi-n-vuNV",
"_score" : 1.0,
"_source":{"created":1489714801383,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7SWwtNgFi-n-vuOD",
"_score" : 1.0,
"_source":{"created":1489714881967,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7XQqtNgFi-n-vuOG",
"_score" : 1.0,
"_source":{"created":1489714902057,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ7_lRtNgFi-n-vuPC",
"_score" : 1.0,
"_source":{"created":1489715067216,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8KZrtNgFi-n-vuPM",
"_score" : 1.0,
"_source":{"created":1489715111530,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8PTctNgFi-n-vuPP",
"_score" : 1.0,
"_source":{"created":1489715131611,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ8ZJ0tNgFi-n-vuPZ",
"_score" : 1.0,
"_source":{"created":1489715171955,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ9CtMtNgFi-n-vuP7",
"_score" : 1.0,
"_source":{"created":1489715342156,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ9cP3tNgFi-n-vuQa",
"_score" : 1.0,
"_source":{"created":1489715446774,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
}, {
"_index" : "nagioslogserver_log",
"_type" : "JOBS",
"_id" : "AVrZ-EkhtNgFi-n-vuRD",
"_score" : 1.0,
"_source":{"created":1489715611936,"created_by":"System","type":"JOBS","me ssage":"Finished Running run_alerts","node":"2df654c1-ea18-4f0c-ac88-ecd7b9b2e48 5","source":"Nagios Log Server"}
} ]
}
}
-----------
Thank you
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Alert setup - not automatically run/fire
Can you attach the file /var/log/cron?
What is the output of:
What is the output of:
Code: Select all
# service crond status
# date
# grep "date.timezone" /etc/php.iniPrevious Nagios employee
Re: Alert setup - not automatically run/fire
Hi,
Cron files attached
The output of the command is empty. But, if I look at the file manually, I can find
/datetime.configuration.php#ini.date.timezone
date.timezone = US/Eastern
[root@smar-nagios-ls01 ~]# # service crond status
[root@smar-nagios-ls01 ~]# # date
[root@smar-nagios-ls01 ~]# # grep "date.timezone" /etc/php.ini
[root@smar-nagios-ls01 ~]#
Cron files attached
The output of the command is empty. But, if I look at the file manually, I can find
/datetime.configuration.php#ini.date.timezone
date.timezone = US/Eastern
[root@smar-nagios-ls01 ~]# # service crond status
[root@smar-nagios-ls01 ~]# # date
[root@smar-nagios-ls01 ~]# # grep "date.timezone" /etc/php.ini
[root@smar-nagios-ls01 ~]#
You do not have the required permissions to view the files attached to this post.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Alert setup - not automatically run/fire
The output is empty because you prepended a # to the actual command therefor nullifying it. Please try again without the leading #.
Also the file I'm looking is precisely called /var/log/cron, if you don't have that file that indicates an issue.
Also the file I'm looking is precisely called /var/log/cron, if you don't have that file that indicates an issue.
Previous Nagios employee
Re: Alert setup - not automatically run/fire
Ah, you can tell how familiar I am with Linux. Really did not pay attention to that.
Here is the result
[root@smar-nagios-ls01 ~]# service crond status
crond (pid 1191) is running...
[root@smar-nagios-ls01 ~]# date
Fri Jun 2 10:54:11 PDT 2017
[root@smar-nagios-ls01 ~]# grep "date.timezone" /etc/php.ini
; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = US/Eastern
cron file is attached
Thank you
Here is the result
[root@smar-nagios-ls01 ~]# service crond status
crond (pid 1191) is running...
[root@smar-nagios-ls01 ~]# date
Fri Jun 2 10:54:11 PDT 2017
[root@smar-nagios-ls01 ~]# grep "date.timezone" /etc/php.ini
; http://www.php.net/manual/en/datetime.c ... e.timezone
date.timezone = US/Eastern
cron file is attached
Thank you
You do not have the required permissions to view the files attached to this post.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Alert setup - not automatically run/fire
Please try the following:
From NLS > Administration > Command Subsystem do a Reset All Jobs.
Wait a minute then refresh NLS > Administration > Command Subsystem
Once run_all_alerts comes back with SUCCESS, please ctrl-C out the tail command and share the full output from it.
Code: Select all
tail -F /usr/local/nagioslogserver/var/jobs.logWait a minute then refresh NLS > Administration > Command Subsystem
Once run_all_alerts comes back with SUCCESS, please ctrl-C out the tail command and share the full output from it.
Previous Nagios employee
Re: Alert setup - not automatically run/fire
Here is the result
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
Running command update_check with args ' ' for job id: run_update_check
SUCCESS
Processed 0 node jobs.
Processed 1 global jobs.
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
Processed 0 node jobs.
Processed 0 global jobs.
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
Running command update_check with args ' ' for job id: run_update_check
SUCCESS
Processed 0 node jobs.
Processed 1 global jobs.
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
Processed 0 node jobs.
Processed 0 global jobs.
tail: /usr/local/nagioslogserver/var/jobs.log: file truncated
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Alert setup - not automatically run/fire
Please provide a screenshot of NLS > Administration > Command Subsystem
Previous Nagios employee