Menu

Problem to Import configs from Nagios Core to NagiosQL

2024-05-22
2024-06-08
  • Vinicius Sales Leite

    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.

     
  • Martin

    Martin - 2024-05-22

    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/

     
  • Vinicius Sales Leite

    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
  • Vinicius Sales Leite

    Maybe the problem are in nagios.cgi file? idk

     
  • Paul Clayton

    Paul Clayton - 2024-05-25

    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.

     
  • Paul Clayton

    Paul Clayton - 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.

    strace -f <nagiosql command>
    
     
  • Vinicius Sales Leite

    chown apache:nagios
    chmod 777

     
  • Martin

    Martin - 2024-05-30

    Remember to check the correct php.ini - not CLI but web server and restart Apache after every change to the php.ini

     
  • Vinicius Sales Leite

    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 ?

     
  • Martin

    Martin - 2024-06-08

    Three possible causes:

    1. 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.

    2. 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.

    1. 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.
     

Log in to post a comment.