Option to monitor status of NLS from XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Option to monitor status of NLS from XI

Post 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.
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

Post 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
}
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked