Page 1 of 1

NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 1:26 pm
by MissouriSpartan
I just installed NagiosQL to use with my Nagios Core installation. Nagios Core is working just fine. No problems there.

However.........after installing NagiosQL exactly as the instructions pointed out, I can't log into the web interface at all!!! "Login failed" for any account I use, including the root account.

Yes, the nagiosql database exists, yes permissions are right (direct copy/paste off of instructions). Still nothing. Looking in my Apache2 error.log file reveals the following:

Code: Select all

[Tue Aug 29 13:05:40.255184 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 133, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255203 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 133, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255219 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 133, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255233 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 133, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255262 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 138, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255285 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 139, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255306 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 140, referer: http://nagios.m$
[Tue Aug 29 13:05:40.255322 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: data in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 141, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255639 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Notice:  Undefined index: version in /usr/local/nagios/share/nagiosql/functions/prepend_adm.php on line 233, referer: http://mydns/nagios/nagiosql/index.php
[Tue Aug 29 13:05:40.255719 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_real_escape_string(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 280, referer: http:$
[Tue Aug 29 13:05:40.255742 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_real_escape_string(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 280, referer: http:$
[Tue Aug 29 13:05:40.255768 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_query(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 185, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255786 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_error(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 198, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255829 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_query(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 116, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255849 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_error(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 122, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255874 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_query(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 226, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255893 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_error(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 228, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.255912 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_insert_id(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 229, referer: http://nagios.$
[Tue Aug 29 13:05:40.255932 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_affected_rows(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 230, referer: http://nag$
[Tue Aug 29 13:05:40.262846 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_query(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 116, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.262877 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_error(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 122, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.262900 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_query(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 116, referer: http://nagios.mydns$
[Tue Aug 29 13:05:40.262950 2017] [:error] [pid 1415] [client 10.102.12.15:58720] PHP Warning:  mysqli_error(): invalid object or resource mysqli\n in /usr/local/nagios/share/nagiosql/functions/mysqli_class.php on line 122, referer: http://nagios.mydns$
Any ideas? I'm not experienced enough in PHP to know where to start on this.

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 1:38 pm
by scottwilkerson
We do not maintain NagiosQL but will try to help.

NagiosQL uses different users than your Nagios Core system.

What instructions did you follow?

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 1:41 pm
by MissouriSpartan
I tried to find the latest instructions post I could through Google. Here:

http://www.ubuntugeek.com/nagios-core-c ... rface.html

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 2:11 pm
by scottwilkerson
This is the user is is going to need, whatever you entered here:
ql.PNG

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 2:16 pm
by MissouriSpartan
Right, which is what I used. However, I still received the nice, red "Login failed!!" below the fields.

I understand if this isn't the right place to post for this. That's my mistake. I'll try to find the right spot, unless you can point me in that direction.

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 2:34 pm
by scottwilkerson
You may be able to modify the password in the tbl_user table of the nagiosql database.

I do believe it needs to be a MD5 password, something like

Code: Select all

update tbl_user SET password=MD5('new_password') WHERE username='admin';

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 2:50 pm
by MissouriSpartan
That worked!!! Thanks so much.

I will look for the correct spot to post in the future. Sorry for the mis-post.

Have a good one!!

Re: NagiosQL - Can't Login!!!

Posted: Tue Aug 29, 2017 3:34 pm
by scottwilkerson
MissouriSpartan wrote:That worked!!! Thanks so much.

I will look for the correct spot to post in the future. Sorry for the mis-post.

Have a good one!!
Excellent! Glad to be of assistance.