Announcement

Collapse
No announcement yet.

Oreon & nagios config

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Oreon & nagios config

    I'm running Nagios 2.5 and Oreon 1.3.1. I want to configure perparse as pipe, as described in http://perfparse.sourceforge.net/docs.php. From what I understand, this needs me to edit misccommands.cfg to add additional commands.

    Problem is, that the Oreon interface doesn't provide access to this config file. If I edit it by hand, the file I edited by hand will be overwritten by Oreon. Editing the filesGeneration/nagiosCFG/misscommands.cfg won't have any effect either, as Oreon overwrites this file too as soon as I generate new config files. Is there any way for me to exclude files from being overwritten, add new config files to the interface or any other method? As I would like to use Oreon to add hosts and services. but I would like to be able to edit config files by hand too with Oreon overwriting every file every time.

    Thanks in advance.
    Nagios 2.5 on FreeBSD 6.2-PRERELEASE

  • #2
    I know that configuring perfparse is very hard. But i've got a very good manual, the only thing is: it is in german
    I'm translating it, but since i've got not that much time, it is still in progress.
    But i think it will still help you. for me it works very well.
    So here is the (german) manual for configuring perfparse:
    ===== Voraussetzungen =====

    Benötigte Devel Librarys installieren, falls nicht schon vorhanden:
    * mysql-dev
    * zlib-dev
    * freetype2-dev
    * fontconfig-dev
    * xlib-dev
    * glib-dev (Version muss größer 2.0.0 sein)
    * gd-dev

    ===== Installation =====

    Perfparse entpacken und im Perfparse-Verzeichnis ./configure mit folgenden Parametern aufrufen:
    <code>./configure --prefix=/etc/nagios/perfparse --with-imagedir=/usr/share/nagios/images --with-cgidir=/usr/lib/nagios/cgi --with-http_image_path=/nagios/images</code>

    ===== Konfiguration =====

    === Dateien und Tabellen anlegen ===

    **Sämtliche Ordner und Dateien müssen für Nagios lesbar/schreibbar/ausführbar sein; Oreon benutzt diese unter dem selben Usernamen wie Nagios**\\
    \\
    Folgende Dateien ändern:
    <code bash>cp /etc/nagios/perfparse/etc/perfparse.cfg-sample /etc/nagios/perfparse/etc/perfparse.cfg</code>
    <code bash>cp /etc/nagios/perfparse/bin/perfparse.sh-example /etc/nagios/perfparse/bin/perfparse.sh</code>
    \\
    An dieser Stelle sollte ein User perfparse mit dem Passwort perfparse und eine Datenbank perfparse, in die der Benutzer perfparse schreiben/lesen/löschen darf, erstellt werden.\\
    \\
    In das Verzeichnis des entpackten Perfparse wechseln und Datenbank erstellen lassen:
    <code bash>cd scripte;cat mysql_create.sql | mysql -u perfparse -p -D perfparse</code>
    Nun sollte die Datenbank perfparse einige Tabellen enthalten.\\

    === Nagios.cfg ===

    Unter /etc/nagios/ zu finden, aber unter Oreon zu ändern.
    Folgende Parameter müssen in der nagios.cfg geändert werden:
    <code>process_performance_data=1
    host_perfdata_command=process-host-perfdata
    service_perfdata_command=process-service-perfdata
    perfdata_timeout=5</code>

    === Resource.cfg ===

    Unter /etc/nagios/ zu finden. Unter Oreon folgendes Makro hinzufügen: $USER2$=/Pfad/zu/nagios/perfparse\\

    === Misccommands.cfg ===

    Unter /etc/nagios/ zu finden. Unter Oreon bei Users->Notification Commands die Definitionen der Kommandos process-host-perfdata und process-service-perfdata umbennenen und durch die folgende Definition ersetzen:
    <code>
    define command{
    command_name process-service-perfdata
    command_line /etc/nagios/perfparse/bin/perfparse_nagios_pipe_command.pl /var/log/nagios/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICEOUTPUT$" "$SERVICESTATE$" "$SERVICEPERFDATA$"
    }

    define command{
    command_name process-host-perfdata
    command_line /etc/nagios/perfparse/bin/perfparse_nagios_pipe_command.pl /var/log/nagios/perfdata-host.log "$TIMET$" "$HOSTNAME$" "$HOSTOUTPUT$" "$HOSTPERFDATA$"
    }
    </code>

    === Nagios_Perfparse.cfg ===

    Unter /etc/nagios/ zu finden. Den Eintrag perfparse_nagios_command.pl durch perfparse_nagios_pipe_command.pl ersetzen.

    === Perfparse.cfg ===

    Unter /etc/nagios/perfparse/etc/ zu finden. Unter Oreon ändern, sollte so aussehen:
    <code>
    Server_Port = "3306"
    Service_Log = " | /var/log/nagios/perfdata-service.log"
    Service_Log_Position_Mark_Path = "/var/log/nagios/"
    Error_Log = "/var/log/nagios/perfparse.log"
    Error_Log_Rotate = "Yes"
    Error_Log_Keep_N_Days = "7"
    Drop_File = "/var/log/nagios/perfparse.drop"
    Drop_File_Rotate = "Yes"
    Drop_File_Keep_N_Days = "7"
    Lock_File = "/var/lock/perfparse.lock"
    Show_Status_Bar = "Yes"
    Do_Report = "No"
    Default_user_permissions_Policy = "rw"
    Default_user_permissions_Host_groups = "rw"
    Default_user_permissions_Summary = "rw"
    Output_Log_File = "Yes"
    Output_Log_Filename = "/var/log/nagios/perfparse_output_log"
    Output_Log_Rotate = "Yes"
    Output_Log_Keep_N_Days = "7"
    Use_Storage_Socket_Output = "No"
    Storage_Socket_Output_Host_Name = "localhost"
    Storage_Socket_Output_Port = "3306"
    Use_Storage_Mysql = "Yes"
    No_Raw_Data = "No"
    No_Bin_Data = "No"
    DB_User = "perfparse"
    DB_Pass = "perfparse"
    DB_Name = "perfparse"
    DB_Host = "localhost"
    Dummy_Hostname = "dummy"
    Storage_Modules_Load = "mysql"
    </code>

    ===== Angaben für Oreon ======

    Unter Oreon müssen dieselben Angaben für die perfparse.cfg gemacht werden, wie vorher für Nagios.

    --------------------------------------------

    I hope this will help you. If you've got problems with the language, then please contact me.

    Comment


    • #3
      The only way is to ddit them in the console and import them into Oreon.

      Comment


      • #4
        Ah thank you very much for that. I've put it trough Babelfish, so it should be somewhat understandable now :-)

        And how exactly can I import the files into Oreon?
        Nagios 2.5 on FreeBSD 6.2-PRERELEASE

        Comment


        • #5
          configutaion>nagios>inport. you can copu and paste your configurations in the output et click imprt
          Julien Mathis
          Centreon Project Leader
          www.merethis.com |

          Comment


          • #6
            I just have a load option, is that the import section you mean? Sorry if I ask silly questions, but I just want to make sure I'm doing it right.

            Thanks for the help so far.
            Nagios 2.5 on FreeBSD 6.2-PRERELEASE

            Comment


            • #7
              Hey Silentsnake,

              He meant the Load Section. There you've got a field manual filling, where you can put stuff like simply one definition , but if you want to import more stuff, then use the file import funktion.

              Greetings,

              Ira

              Comment


              • #8
                Okay I've got a bit further now.

                I've followed your guide, and data is being added in /var/log/nagios/perfdata-host.log and /var/log/nagios/perfdata-service.log. However, data is not being inserted in the database. Any idea how I can check that? Also, should the perfparsed run? If that's the case, it exits with "No module was loaded. Check the Storage_Module_Load config option."

                Another side note, when I try to move the config files, Oreon is happily generating the config files but it's not actually moving them. Sometimes this does work, however. Any idea what this could be?

                Thanks for all the help so far.
                Nagios 2.5 on FreeBSD 6.2-PRERELEASE

                Comment


                • #9
                  For perfparse, maybe here :
                  http://forum.oreon-project.org/viewtopic.php?t=2641
                  Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
                  Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
                  Fedora Core 5 - 2.6.20-1.2320

                  Comment


                  • #10
                    Thanks for the tip. Unfortunately I don't know French and babelfish can't make much of it either -- I'll give it a try tomorrow anyway
                    Nagios 2.5 on FreeBSD 6.2-PRERELEASE

                    Comment


                    • #11
                      Uhhhh,

                      I'm so sorry, i forgot to post:

                      in perfparse_nagios_pipe_command.pl you have to add at the very end:
                      system ('/etc/nagios/perfparse/bin/perfparse-log2mysql --serviceperf-log /var/log/nagios/perfdata-service.log');

                      And you have to add a cronjob to your system, that will refresh your database eyery two(if you wish) minutes.

                      Something like:
                      2 * * * * root /etc/nagios/perfparse/bin/perfparse.sh

                      Note that the parameters of the perfparse.cfg must be the same in /etc/nagios/ and /etc/nagios/perfparse/etc/
                      I'm so sorry, that i forgot to tell you that. :cry:

                      So plz, contact me, if it still doesn't work. Even per ICQ, if you wish.
                      I'm still working on that manual and of course on the translation, so all your posts will help me to find out, what's still missing in that manual.
                      Bye,

                      Ira

                      Comment


                      • #12
                        Hi Ira,

                        Thanks for that -- and no need to say sorry really I appreciate you are spending so much time help me out on this one.

                        I have perfparse logging data in the database now. However, Oreon still says it can't connect to the database, but I'm sure the credentials are correct. Any idea how I can check that?

                        Thanks.
                        Nagios 2.5 on FreeBSD 6.2-PRERELEASE

                        Comment


                        • #13
                          Hi,

                          Well the first time when I installed Oreon, I had the same problem. Have you looked in Options->General Options that everything is correct? In my case there was a Problem, but Oreon didn't show me that until i got there and changed something.
                          In the section Configuration->Nagios->Perfparse you must have the same values in the perfparse.cfg.
                          Have you checked for your PEAR modules? There are some modules needed, that Oreon didn't told you to have, such as DB with all (!!!) it's dependencies?
                          An other hint , if you have problems with graphing, may be that you have your register_globals parameter in the php.ini (SuSE: /etc/php5/apache2/) set "on", but they must be "off". This causes problems with the variables $end and $start by graphing.
                          Hope that will help you, bye and have nice weekend,

                          Ira

                          Comment


                          • #14
                            Are you talking about the process-service-* and process-host-* commands? You can set them via oreon, no need to edit nagios files by hand, just set them as a notification commands.

                            Comment


                            • #15
                              Originally posted by Iralein
                              Have you checked for your PEAR modules? There are some modules needed, that Oreon didn't told you to have, such as DB with all (!!!) it's dependencies?
                              An other hint , if you have problems with graphing, may be that you have your register_globals parameter in the php.ini (SuSE: /etc/php5/apache2/) set "on", but they must be "off". This causes problems with the variables $end and $start by graphing.
                              Hi, can you give more explanations about missing PEAR modules and register_globals. To improve php installation. Thanks.
                              StatusMap Module - NDO Tools Module - ImportCSV Module - SNMP-UI Module - PDFReports Module
                              Dons Paypal

                              Comment

                              Working...
                              X