Page 1 of 1

Nagios Log Repository File

Posted: Tue Mar 07, 2017 6:55 am
by anish
Hi I have created the Nagios log repository file following the documentation

"https://assets.nagios.com/downloads/nag ... enance.pdf"


But i am not able to see any nagiosSnap shots were been created . can you please help me in resolving the issue . PFA

Re: Nagios Log Repository File

Posted: Tue Mar 07, 2017 10:15 am
by mcapra
Can you share the output of the following commands executed from the CLI of one of your Nagios Log Server machines:

Code: Select all

curator --debug snapshot --repository NagiosBackup indices --older-than 1 --time-unit days --timestring %Y.%m.%d
df -h
ls -al /repository

Re: Nagios Log Repository File

Posted: Tue Mar 07, 2017 12:06 pm
by anish
Hi ,
Please find the attachment

Re: Nagios Log Repository File

Posted: Tue Mar 07, 2017 12:33 pm
by mcapra
Here's the problem:

Code: Select all

2017-03-07 12:10:58,015 ERROR       curator.api.snapshot        create_snapshot:64   Failed to verify all nodes have repository access.
It doesn't look like all of your NLS nodes have access to the /repository path. You'll need to make sure that all nodes in your cluster have this logically mounted with the correct permissions (usually user "nagios" and group "users" with write permissions is needed).

Re: Nagios Log Repository File

Posted: Thu Mar 09, 2017 8:01 am
by anish
Hi ,

We have two nodes in current Nagios Log . I have run some scripts . Please check the output.

login as: root
root@sesklnglsipd01's password:
Last login: Thu Mar 9 07:23:42 2017 from 172.18.214.81

[root@SESKLNGLSIPD01 ~]# ls -ld /repository
drwxrwxrwx 3 nagios users 4096 Feb 28 12:07 /repository
[root@SESKLNGLSIPD01 ~]# id nagios
uid=500(nagios) gid=100(users) groups=100(users),48(apache),500(nagios)
[root@SESKLNGLSIPD01 ~]# curl -XGET "localhost:9200/_snapshot?pretty"
{
"NagiosBackup" : {
"type" : "fs",
"settings" : {
"compress" : "true",
"location" : "/repository"
}
}
}
[root@SESKLNGLSIPD01 ~]# curator snapshot --repository "repository" indices --all-indices 2017-03-09 07:55:13,959 INFO Job starting: snapshot indices
2017-03-09 07:55:13,960 WARNING Overriding default connection timeout. New timeout: 21600
2017-03-09 07:55:13,985 INFO Matching all indices. Ignoring flags other than --exclude.
2017-03-09 07:55:13,985 INFO Action snapshot will be performed on the following indices: [u'kibana-int', u'logstash-2017.03.04', u'logstash-2017.03.05', u'logstash-2017.03.06', u'logstash-2017.03.07', u'logstash-2017.03.08', u'logstash-2017.03.09', u'nagioslogserver', u'nagioslogserver_log']
2017-03-09 07:55:14,442 ERROR Failed to verify all nodes have repository access.
2017-03-09 07:55:14,442 WARNING Job did not complete successfully.
[root@SESKLNGLSIPD01 ~]#
[root@SESKLNGLSIPD01 ~]# curator snapshot --repository "NagiosBackup" indices --all-indices
2017-03-09 07:57:15,845 INFO Job starting: snapshot indices
2017-03-09 07:57:15,845 WARNING Overriding default connection timeout. New timeout: 21600
2017-03-09 07:57:15,868 INFO Matching all indices. Ignoring flags other than --exclude.
2017-03-09 07:57:15,868 INFO Action snapshot will be performed on the following indices: [u'kibana-int', u'logstash-2017.03.04', u'logstash-2017.03.05', u'logstash-2017.03.06', u'logstash-2017.03.07', u'logstash-2017.03.08', u'logstash-2017.03.09', u'nagioslogserver', u'nagioslogserver_log']
2017-03-09 07:57:16,420 ERROR Failed to verify all nodes have repository access.
2017-03-09 07:57:16,420 WARNING Job did not complete successfully.
[root@SESKLNGLSIPD01 ~]#

Re: Nagios Log Repository File

Posted: Thu Mar 09, 2017 12:04 pm
by mcapra
From the CLI of each NLS machine, can you share the output of:

Code: Select all

ls -al /repository