Page 1 of 1

Option to monitor status of NLS from XI

Posted: Thu Jan 31, 2019 9:55 am
by Cpt.Ackbar
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.

Re: Option to monitor status of NLS from XI

Posted: Thu Jan 31, 2019 11:18 am
by scottwilkerson
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

Code: Select all

http://<LOGSERVER>/nagioslogserver/api/backend/_cluster/health?pretty&token=<API_KEY>
results look something like this

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
}