Page 2 of 2

Re: Unable to login with nagiosadmin

Posted: Wed Dec 22, 2021 10:46 pm
by dfsocha
Perry,

I'm doing the commands now and grabbing the files from the server and bringing them to my Windows machine and will send you a private message with the files.

FYI, the first command produced the following result:

Code: Select all

[root@NagiosLogServer scripts]# tar -czvf /tmp/logs.tar.gz /usr/local/nagioslogserver/var/auditlog.log /var/log/httpd/ /var/log/apache2/
tar: Removing leading `/' from member names
/usr/local/nagioslogserver/var/auditlog.log
/var/log/httpd/
/var/log/httpd/access_log-20211024
/var/log/httpd/error_log-20211128
/var/log/httpd/error_log-20211205
/var/log/httpd/access_log-20211209
/var/log/httpd/access_log-20211212
/var/log/httpd/error_log-20211212
/var/log/httpd/access_log-20211220
/var/log/httpd/access_log
/var/log/httpd/error_log-20211220
/var/log/httpd/error_log
tar: /var/log/apache2: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

Not sure if that's OK or not but I'll send the files I have. The 2nd command did create a large file so I will send them in a separate pm (one for each file) as requested.

Re: Unable to login with nagiosadmin

Posted: Mon Dec 27, 2021 11:03 am
by pbroste
Hello @dfsocha

Thanks for following up, appears that we are missing a field and to create a user account looks like the following. In the example we are setting up a new user account reference number 3.

First, let's verify that another user account is already associated with 3; if so please make adjustments:

Code: Select all

curl -XGET http://localhost:9200/nagioslogserver/user/3
If the results are false then we are good to go to create new user account:

Code: Select all

curl -XPUT 'http://localhost:9200/nagioslogserver/user/3' -d '{"username":"nagiosadmin3","username_lower":"nagiosadmin3","name":"Nagios Administrator","password":"280d44ab1e9f79b5cce2dd4f58f5fe91f0fbacdac9f7447dffc318ceb79f2d02","auth_type":"admin","email":"[email protected]","language":"default","apiaccess":"1","apikey":"721d387b623e725076b68b4760489ead197ddb7b","created":"2021-06-14 12:10:14","created_by":0,"default_dashboard":"/dashboard/elasticsearch/AXoLSc8Q5hxpyzbmI-kt"}'
Make sure that you see the following results:
{"_index":"nagioslogserver","_type":"user","_id":"3","_version":1,"created":true}
Login with nagiosadmin3 with password: welcome

Thanks,
Perry

Re: Unable to login with nagiosadmin

Posted: Mon Dec 27, 2021 1:15 pm
by dfsocha
That worked and I'm back in!

Thank you!

Re: Unable to login with nagiosadmin

Posted: Mon Dec 27, 2021 4:13 pm
by pbroste
Excellent @dfsocha, that is good to hear. I will go ahead and lock this post.

Please let us know if there is anything further,
Perry