Is there any way how to monitor status of logserver. By status I mean Green / Yellow / Red.
If there is no plugin can you describe some option how to get status from command line locally on Log server (CentOS 6)? Maybe I could prepare some script but I need to know the details about getting info from NLS API.
Thanks.
Option to monitor status of NLS from XI
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Option to monitor status of NLS from XI
There isn't a builtin plugin to do it but if you were writing a script to do it you can get it at the following URL in JSON
results look something like this
Code: Select all
http://<LOGSERVER>/nagioslogserver/api/backend/_cluster/health?pretty&token=<API_KEY>Code: Select all
{
"cluster_name": "f7fdb4b5-4a39-4c78-835e-8b2435ff4e42",
"status": "green",
"timed_out": false,
"number_of_nodes": 2,
"number_of_data_nodes": 2,
"active_primary_shards": 296,
"active_shards": 592,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0
}