Home » Categories » Products » Nagios Log Server » Troubleshooting » Common Problems

Nagios Log Server - Troubleshooting Commands

Troubleshooting Commands

This is a list of commands that can be used to help diagnose issues with Nagios Log Server.

Be careful, some commands can be destructive and can result in data loss!

 

 

Generic Information Gathering

Master:

curl 'localhost:9200/_cat/master?v'

 

Nodes:

curl 'localhost:9200/_cat/nodes?v'

 

Pending tasks:

curl 'localhost:9200/_cat/pending_tasks?v'

 

Recovery:

curl -XGET 'localhost:9200/_cat/recovery?v'

 

Running plugins:

curl 'localhost:9200/_cat/plugins?v'

 

Cluster basic health:

curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'

 

Check jvm settings:

curl -XGET localhost:9200/_nodes/jvm?pretty

 

Shard status (use index status instead for clarify, in most cases):

curl -XGET http://localhost:9200/_cat/shards

 

Cluster state:

curl -XGET 'http://localhost:9200/_cluster/state?pretty'

 

Shard health (index health works better in most circumstances):

curl -XGET 'http://localhost:9200/_cluster/health/*?level=shards'

 

 

Red Cluster Recovery

Check index health:

curl 'localhost:9200/_cluster/health?level=indices&pretty'

 

Shard list:

curl -s localhost:9200/_cat/shards

 

Unassigned shards:

curl -s localhost:9200/_cat/shards | grep UNASS

 

Delete bad index:

curl -XDELETE 'http://localhost:9200/twitter/'

 

 

Active Troubleshooting

Tail maintenance logs:

tail -f /usr/local/nagioslogserver/var/jobs.log

 

Tail poller logs:

tail -f /usr/local/nagioslogserver/var/poller.log

 

Shut down all nodes:

curl -XPOST 'http://localhost:9200/_shutdown'

 

Check users:

curl -XGET 'http://localhost:9200/nagioslogserver/_search?type=user&pretty'

 

 

Backup Troubleshooting

Check running knapsack export:

curl -XPOST 'http://localhost:9200/_export/state'

Typically jobs.log should be tailed and the backup+maintenance command should be forced from the subsys - jobs.log should complain about a partial snapshot.

 

Delete a snapshot (versions <= 1.3.0):

curator delete --older-than 1 --prefix logstash-2015.05.19 (replace with snapshot name)

(versions >= 1.3.0):

curator delete snapshots --repository nlsbackup --prefix (replace with snapshot prefix)

 You can also delete snapshots from the Web GUI under the backup page, or directly from the repo.

 

 

Purpose-Driven Commands

Check min master nodes:

curl localhost:9200/_cluster/settings?pretty

 

Set min master nodes:

curl http://localhost:9200/_cluster/settings -XPUT -d '{ "persistent": { "discovery.zen.minimum_master_nodes": 2} }'

 

Check users:

curl -XGET 'http://localhost:9200/nagioslogserver/_search?type=user&pretty'

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

1 (1)
Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios Log Server - Logstash not running after upgrade to 2.0
Viewed 3714 times since Tue, Nov 14, 2017
Nagios Log Server - Understanding and Troubleshooting Yellow Cluster Health
Viewed 10362 times since Mon, Feb 15, 2016
Nagios Log Server - Troubleshooting SELinux and rsyslog
Viewed 7969 times since Wed, Mar 30, 2016
Nagios Log Server - Troubleshooting Backups
Viewed 4649 times since Fri, Apr 15, 2016
Nagios Log Server - Logstash process dying
Viewed 5156 times since Mon, Apr 10, 2017
Nagios Log Server - Logs Not Searchable or Not Coming In
Viewed 11501 times since Tue, Jan 27, 2015
Nagios Log Server - Resetting nagiosadmin Password
Viewed 11339 times since Tue, Aug 9, 2016
Forwarding Logs from Nagios Log Server to Another Destination
Viewed 5371 times since Wed, Sep 16, 2020
Pages Not Displaying Correctly
Viewed 7043 times since Mon, Jan 25, 2016
Nagios Log Server - License Activation Issues
Viewed 4248 times since Wed, Dec 13, 2017