I'm having some problems with NAGIOSQL for monitoring printers and computers.
I have installed and configured NAGIOS CORE but it is very complicated to manage, especially changing printers that change IP, serial number, etc., so I decided to install NAGIOSQL to help me with this task, after learning a little I managed to get the interface working However, now I'm having some problems that I'll report below:
When trying to import any configuration from NAGIOS CORE the screen crashes and the file is not imported into NAGIOSQL (PHOTO1)
In the Administrations --> Support menu, the following errors appear, which I honestly don't know if is "normal" (PHOTO2)
In the Tools--> Nagios Control menu, the Check configuration files buttons give the following error (PHOTO3)
on the Restart Nagios button another error (PHOTO4).
If anyone can help me in these cases I would be immensely grateful.
After following the steps I managed to progress to a certain point, I basically managed to solve 75% of the problems, but I still can't import the files from Nagios Core to Nagios QL, the Crash screen appears and the files don't import.
I'm also attaching it so you can see the support screen to see if I can find a light at the end of the tunnel lol.
what order are you loading the configs?
hosts and services should be last.
php has a maximum file size, which would need to be changed in php.ini.
for large files like host and services, split them into smaller chunks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have you looked at your directory permissions and owner ship of files and directories.
if that all looks ok, try the command line import command and use the strace command to get an internal view of what error is being returned.
strace -f <nagiosql command>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is definitely not a problem of NagiosQL but is due to the web server or the system settings that do not allow file upload (at best SELinux or other security settings).
I recommend the web search with the known error parameters and the exact OS / web server data - this is probably best. It is difficult to estimate this without precise knowledge of the environment and its configuration
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Wonderful, I managed to identify that the problem was actually the server's Anti-Virus that was blocking the import.
So I managed to import lol, but now I'm stuck with another error, which seems to be apparently simple, when I edit the nagios.cfg file so that it looks for the files within /etc/nagiosql/, nagios generates a generic- duplication error. contact in templates.cfg but I can't find the duplicate line.
the Nagios configuration file (nagios.cfg) still contains the paths to both configuration files - i.e. /etc/nagiosql/templates.cfg and /etc/nagios/templates.cfg (paths may differ). Only the path to the NagiosQL configuration files may still be there.
the object is actually contained in two different configuration files. To check this, change to /etc/nagiosql on the command line and use this command:
grep -r generic-contact *
If this string is contained in two configuration files, delete it from one of them.
NagiosQL does not write a file with the name templates.cfg - at best this is still an old manual file that must be deleted from the nagiosql directory - or it is still referenced in nagios.cfg as in cause 1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good morning guys.
I'm having some problems with NAGIOSQL for monitoring printers and computers.
I have installed and configured NAGIOS CORE but it is very complicated to manage, especially changing printers that change IP, serial number, etc., so I decided to install NAGIOSQL to help me with this task, after learning a little I managed to get the interface working However, now I'm having some problems that I'll report below:
When trying to import any configuration from NAGIOS CORE the screen crashes and the file is not imported into NAGIOSQL (PHOTO1)
In the Administrations --> Support menu, the following errors appear, which I honestly don't know if is "normal" (PHOTO2)
In the Tools--> Nagios Control menu, the Check configuration files buttons give the following error (PHOTO3)
on the Restart Nagios button another error (PHOTO4).
If anyone can help me in these cases I would be immensely grateful.
It appears that the configuration has not been fully implemented. In particular, chapters 1.2, 1.3 and 1.4 in the instructions should be checked:
https://sourceforge.net/projects/nagiosql/files/nagiosql/Documentation/
thanks for the support martin,
After following the steps I managed to progress to a certain point, I basically managed to solve 75% of the problems, but I still can't import the files from Nagios Core to Nagios QL, the Crash screen appears and the files don't import.
I'm also attaching it so you can see the support screen to see if I can find a light at the end of the tunnel lol.
Last edit: Vinicius Sales Leite 2024-05-24
Maybe the problem are in nagios.cgi file? idk
what order are you loading the configs?
hosts and services should be last.
php has a maximum file size, which would need to be changed in php.ini.
for large files like host and services, split them into smaller chunks.
Even inserting only one file at a time doesn't matter (example: commands.cfg).
Last edit: Vinicius Sales Leite 2024-05-27
Have you looked at your directory permissions and owner ship of files and directories.
if that all looks ok, try the command line import command and use the strace command to get an internal view of what error is being returned.
chown apache:nagios
chmod 777
It may be an incorrect setting in php.ini:
https://stackoverflow.com/questions/7574260/php-connection-reset-on-large-file-upload-regardless-correct-setting
Or it is due to an Apache module:
https://serverfault.com/questions/1022288/uploads-failing-with-no-reason
It is definitely not a problem of NagiosQL but is due to the web server or the system settings that do not allow file upload (at best SELinux or other security settings).
I recommend the web search with the known error parameters and the exact OS / web server data - this is probably best. It is difficult to estimate this without precise knowledge of the environment and its configuration
Remember to check the correct php.ini - not CLI but web server and restart Apache after every change to the php.ini
Wonderful, I managed to identify that the problem was actually the server's Anti-Virus that was blocking the import.
So I managed to import lol, but now I'm stuck with another error, which seems to be apparently simple, when I edit the nagios.cfg file so that it looks for the files within /etc/nagiosql/, nagios generates a generic- duplication error. contact in templates.cfg but I can't find the duplicate line.
can you help me ?
Three possible causes:
the Nagios configuration file (nagios.cfg) still contains the paths to both configuration files - i.e. /etc/nagiosql/templates.cfg and /etc/nagios/templates.cfg (paths may differ). Only the path to the NagiosQL configuration files may still be there.
the object is actually contained in two different configuration files. To check this, change to /etc/nagiosql on the command line and use this command:
grep -r generic-contact *
If this string is contained in two configuration files, delete it from one of them.