Notes are not saved for a few services
Notes are not saved for a few services
Hello,
I realized that with some services, changing the "Notes" field under Service Status Detail doesn't work. I write a new note, click on save and the note disappears. However this works fine for other services. How can we fix this?
I realized that with some services, changing the "Notes" field under Service Status Detail doesn't work. I write a new note, click on save and the note disappears. However this works fine for other services. How can we fix this?
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Notes are not saved for a few services
Hello, @vmesquita. Would you be able to open a 'developers console' in your web browser and look for any errors? That needs to be done immediately after you submit the note.
Also, you could run this command while submitting it:
That will show if apache gets any errors.
Please share the output with us.
Also, you could run this command while submitting it:
Code: Select all
tail -f /var/log/httpd/error_logPlease share the output with us.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Notes are not saved for a few services
On the developer console I got this:
On /var/log/httpd/error_log I got:
Code: Select all
GET https://www.youtube.com/embed/fTYU3_yKjLc?rel=0&showinfo=0&iv_load_policy=3 403 (URLBlocked)
fTYU3_yKjLc:12 Mixed Content: The page at 'https://www.youtube.com/embed/fTYU3_yKjLc?rel=0&showinfo=0&iv_load_policy=3' was loaded over HTTPS, but requested an insecure stylesheet '<Editted, our URL>/css/Sistema.css'. This request has been blocked; the content must be served over HTTPS.
fTYU3_yKjLc:19 Mixed Content: The page at 'https://www.youtube.com/embed/fTYU3_yKjLc?rel=0&showinfo=0&iv_load_policy=3' was loaded over HTTPS, but requested an insecure image '<Editted, our URL>/img/logoSistemas.gif'. This content should also be served over HTTPS.
fTYU3_yKjLc:39 Mixed Content: The page at 'https://www.youtube.com/embed/fTYU3_yKjLc?rel=0&showinfo=0&iv_load_policy=3' was loaded over HTTPS, but requested an insecure image '<Editted, our URL>/img/erro_15x15.gif'. This content should also be served over HTTPS.
Code: Select all
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: service_ids in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 327, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 327, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 338, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: service_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 342, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 439, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 73, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: service_ids in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 134, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 134, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: host_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 146, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
[Mon Jan 08 19:09:14 2018] [error] [client 172.27.143.22] PHP Notice: Undefined variable: service_ids_str in /usr/local/nagiosxi/html/includes/components/nocscreen/nocscreenapi.php on line 150, referer: http://nagios/nagiosxi/includes/components/nocscreen/noc.php?host=&hostgroup=Producao&servicegroup=&state=&hide_soft=0&hide_not_dis=0&reporttimesubmitbutton=
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Notes are not saved for a few services
@vmesquita, Did these services always have this kind of problem, or this just started to happen? You may have corrupt tables in your database. Please run the following command:
Code: Select all
mysqlcheck -r -f -u root -pnagiosxi --all-databasesAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Notes are not saved for a few services
Hi npolovenko,
We don't actually know when the issue started, only recently we tried to save some notes and realized it didn't work. I tried the command to fix the tables, but the tool returned OK for all tables, indicating that none was corrupted. Any more ideas?
We don't actually know when the issue started, only recently we tried to save some notes and realized it didn't work. I tried the command to fix the tables, but the tool returned OK for all tables, indicating that none was corrupted. Any more ideas?
Re: Notes are not saved for a few services
What are the permissions of the user, who is trying to enter the note (Admin > Users > Manage Users > Edit)? Are you having the same issue when you are logged in as nagiosadmin? What is the version of Nagios XI and the "Object Notes" component that you are currently using (Admin > System Extensions > Manage Components)? Are you entering a very long note? Special characters?
Try entering a note to one of the "working", and one of the "problem" services, for example "myspecialnote", then see if it was saved in the database:
You can search all notes by running:
You do see any errors/crashed tables in the mysqld.log (or mariadb.log)? Do you see any ndo2db related issues in the /var/log/messages?
Try entering a note to one of the "working", and one of the "problem" services, for example "myspecialnote", then see if it was saved in the database:
Code: Select all
echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep myspecialnoteCode: Select all
echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep objectnotesBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notes are not saved for a few services
I tried with nagiosadmin, same issuelmiltchev wrote:What are the permissions of the user, who is trying to enter the note (Admin > Users > Manage Users > Edit)? Are you having the same issue when you are logged in as nagiosadmin?
Nagios XI 5.4.11, Object Notes has no version informationWhat is the version of Nagios XI and the "Object Notes" component that you are currently using (Admin > System Extensions > Manage Components)?
Not really, any note, even a word, will disappear as soon as click in "Save Changes"Are you entering a very long note? Special characters?
I got this error:Try entering a note to one of the "working", and one of the "problem" services, for example "myspecialnote", then see if it was saved in the database:You can search all notes by running:Code: Select all
echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep myspecialnoteCode: Select all
echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep objectnotes
[root@nagios vmesquita]# echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep myspecialnote
ERROR 1049 (42000): Unknown database 'nagiosxi'
Maybe there's a misspell in the command?
I checked mysqld.log and nothing, the last entry was from 3 days ago.You do see any errors/crashed tables in the mysqld.log (or mariadb.log)? Do you see any ndo2db related issues in the /var/log/messages?
I did a grep for ndo2db in /var/log/messages and only got many messages like this:
Code: Select all
Jan 23 12:53:43 nagios ndo2db: Trimming timedevents.
Jan 23 12:53:43 nagios ndo2db: Trimming systemcommands.
Jan 23 12:53:43 nagios ndo2db: Trimming servicechecks.
Jan 23 12:53:43 nagios ndo2db: Trimming hostchecks.
Jan 23 12:53:43 nagios ndo2db: Trimming eventhandlers.
Re: Notes are not saved for a few services
Perhaps you your mysql db is offloaded to a remote server? If this is the case, try running:I got this error:
[root@nagios vmesquita]# echo 'select * from xi_options;' | mysql -t -uroot -pnagiosxi nagiosxi | grep myspecialnote
ERROR 1049 (42000): Unknown database 'nagiosxi'
Code: Select all
echo 'select * from xi_options;' | mysql -h <remote ip> -t -u<username> -p<password> nagiosxi | grep myspecialnoteAlso, can you check the mysqld.log (or mariadb.log) on the remote server for errors/crashed tables?
One more thing - is your XI an upgrade from a much older version of XI that was using postgres? Can you find your note by running the following commands?
Code: Select all
echo 'select * from xi_options;' | psql nagiosxi nagiosxi | grep myspecialnote
echo 'select * from xi_options;' | psql nagiosxi nagiosxi | grep objectnotesBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notes are not saved for a few services
Hi lmiltchev,
Apparently we still have postgreeSQL, this box has been running and updated for a while.
I found something curious: evey time I try to add a noite to any of the services in which the note is not bring saved, the note actualy goes to this service in the database. Thats' really strange
Apparently we still have postgreeSQL, this box has been running and updated for a while.
This one actually returns the context I put there, but somehow it doesn't make it to the interface:echo 'select * from xi_options;' | psql nagiosxi nagiosxi | grep myspecialnote
Code: Select all
384 | objectnotes_HC-I02-HML_I-leinf-hml__datasource_LeinfDS | MySpecialNote
Re: Notes are not saved for a few services
Try reinstalling the component.
1. Download the component from the Nagios Exchange:
https://exchange.nagios.org/directory/A ... nt/details
2. Install the "Ojbect Notes" component via the web UI (Admin > Manage Components > Browse > objectnotes.zip > Upload & Install)
3. Verify the version number under the "Manage Components" page. You should see version "1.1".
Next, modify the existing note or add a new one to the service in question. See if the changes will take place in the web UI.
1. Download the component from the Nagios Exchange:
https://exchange.nagios.org/directory/A ... nt/details
2. Install the "Ojbect Notes" component via the web UI (Admin > Manage Components > Browse > objectnotes.zip > Upload & Install)
3. Verify the version number under the "Manage Components" page. You should see version "1.1".
Next, modify the existing note or add a new one to the service in question. See if the changes will take place in the web UI.
Be sure to check out our Knowledgebase for helpful articles and solutions!