Announcement

Collapse
No announcement yet.

Nagios CFG import available

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

  • Nagios CFG import available

    hey folks,

    we are running a nagios system which is currently administrated by nagman. this tool like oreon generates configuration data.

    Is there any way to import those configuration data for nagios to oreon databases like some kind of import script ?

    it would be nice if we could migrate to oreon.

    Greetings,
    diLLec

  • #2
    Hi diLLec!

    I think better in English Forum, maybe somebody could not read English in French Forum, maybe I'm wrong

    Anyway, I don't know how to import that kind of configuration files cause i have never used nagman. The export files are not standard nagios cfg files?
    Let us know something else about that files to try to help you!

    Later!
    [Linux 2.4.20-28.7 - RedHat 7.2]
    [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
    [Apache 1.3.x, PHP 5.x, MySQL 5.x]
    [Apache 2.2.x, PHP 5.x, MySQL 5.x]
    [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

    Comment


    • #3
      Hey cih,

      the files which i want to import are standard nagios cfg files which are generated by nagman, like oreon does. I've seen that oreon got a load function for nagios.cfg and resource.cfg but i need to import service checks and hosts etc.

      I'm using Oreon 1.3 Beta.

      Greetings,
      diLLec

      Comment


      • #4
        eps diLLec,

        I managed to import all my config files from Nagios. I explained how I have done it in another post:

        http://forum.oreon-project.org/viewtopic.php?t=1610

        Hope it could help ... please let me know how are you doing.

        Later!
        [Linux 2.4.20-28.7 - RedHat 7.2]
        [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
        [Apache 1.3.x, PHP 5.x, MySQL 5.x]
        [Apache 2.2.x, PHP 5.x, MySQL 5.x]
        [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

        Comment


        • #5
          thank you for your help. We've succeeded in importing the nagios files.

          greetings,
          diLLec

          Comment


          • #6
            You're welcome :wink:
            [Linux 2.4.20-28.7 - RedHat 7.2]
            [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
            [Apache 1.3.x, PHP 5.x, MySQL 5.x]
            [Apache 2.2.x, PHP 5.x, MySQL 5.x]
            [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

            Comment


            • #7
              Hum ca m'interesse cette histoire, tu arrives a loader en rentrant les fichiers un a un, mais tt en mm temps ca merde ?

              Peux tu limiter ton test avec tres peu d'host, voir si ca merde encore et le cas echeant me transmettre tes cfg ?

              Je pense que le prob vient d'un parametre lie a nagios2, une broutille je pense.
              Romain Le Merlus
              Centreon Forge
              MERETHIS

              Comment


              • #8
                Sorry rom, my French is very crappy ... I missed 40 % of your post ... :cry:
                [Linux 2.4.20-28.7 - RedHat 7.2]
                [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
                [Apache 1.3.x, PHP 5.x, MySQL 5.x]
                [Apache 2.2.x, PHP 5.x, MySQL 5.x]
                [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

                Comment


                • #9
                  Ho excuse me ! I think you speak French ! :lol:

                  So I would like to understand how you can't upload a complete archive, and how it works when you upload the files one by one.

                  So, if you can test it with a very small number of hosts and see if the problem occurs again, please send me your hosts.cfg in order to test it by myself.
                  I think it's a little mistake with nagios 2 parameter..

                  Thanks.
                  Romain Le Merlus
                  Centreon Forge
                  MERETHIS

                  Comment


                  • #10
                    I would try to test it again with a compressed file tomorrow morning, now I'm adding stuff to my production Nagios ;P

                    It's very strange but Oreon was not able to read any of the files in the tar.gz and parse it correctly ... but, maybe it's my mistake again ... let's see

                    Maybe you could move this post to English forum, I understand more or less 50% of the posts in French because I speak Catalan, that's similar to French, but some words make me lost ;P I hope I could improve my French soon ( I'm right now doing a French Language Course ops: )
                    [Linux 2.4.20-28.7 - RedHat 7.2]
                    [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
                    [Apache 1.3.x, PHP 5.x, MySQL 5.x]
                    [Apache 2.2.x, PHP 5.x, MySQL 5.x]
                    [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

                    Comment


                    • #11
                      Eps rom,

                      I restart all my setup again from zero, because something strange had happened to my oreon installation (no way to create files correctly from DB, and no errors at all ...). Anyway, I tried to load my config files again from a gzip file, and from a zip file, but no luck at all. I could only import my nagios config files doing it one by one. This way I find some other strange behaviours ( every file I load, first entry was missing in database ... first contact, first contacgroup, first host ...) but I managed to import these items with "Manual Filling" (cool feature). You ask me to send you my config files, but I'm not able to do that (legal stuff, you know) but I assure you nothing strange on files, because they're loading if I do it one by one ... I'm lost at this point.

                      Later!
                      [Linux 2.4.20-28.7 - RedHat 7.2]
                      [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
                      [Apache 1.3.x, PHP 5.x, MySQL 5.x]
                      [Apache 2.2.x, PHP 5.x, MySQL 5.x]
                      [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

                      Comment


                      • #12
                        Did you enable php error ? Because it seems that it's an upload problem.
                        Be sure that /oreon/filesUpload/nagiosCFG is apache writable. I temporary uncompress in this place (and delete it when the operation is finish).

                        You also say that first entry is not record for a single manual file upload.. strange, I'll have a look on it.

                        This header file doesn't work : "application/x-zip-compressed"
                        Those ones work : "application/x-gzip" / "application/octet-stream"

                        Archive I create are made with this command line :
                        Code:
                        tar -czf myArchive.tar.gz cfg1.cfg cfg2.cfg
                        Romain Le Merlus
                        Centreon Forge
                        MERETHIS

                        Comment


                        • #13
                          Hi rom,

                          I solved my problems on tuesday. Reinstalled all again, and now is up and working.

                          Regarding loading cfg files from a gzip, I create the file nearly the same way

                          Code:
                          tar -czvf myNagiosConfig.tar.gz *.cfg
                          So I don't know why the hell is not loading any file. I hope I'm the only one suffering this kind of X files, because i even don't understand the strange behaviour concerning loosing the first item in the one by one file loading ...

                          Well, the good news are that all is working quite fine now

                          Later.
                          [Linux 2.4.20-28.7 - RedHat 7.2]
                          [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
                          [Apache 1.3.x, PHP 5.x, MySQL 5.x]
                          [Apache 2.2.x, PHP 5.x, MySQL 5.x]
                          [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

                          Comment


                          • #14
                            Originally posted by cih
                            So I don't know why the hell is not loading any file. I hope I'm the only one suffering this kind of X files, because i even don't understand the strange behaviour concerning loosing the first item in the one by one file loading ...
                            With your old install isn't it ? The problem is fix now ?
                            Romain Le Merlus
                            Centreon Forge
                            MERETHIS

                            Comment


                            • #15
                              Hi rom,

                              no way to load config files from a gzip or tar archive in the new installation neither. I was able to load config files one by one, but loosing the first item in every config file (in the new installation). Anyway, I do it by hand to complete all the configs, and now is fully working, but problems may still be there. When beta2 comes out would do again fresh install and let you know how it works for me.

                              Thanks for the interest!

                              Later.
                              [Linux 2.4.20-28.7 - RedHat 7.2]
                              [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
                              [Apache 1.3.x, PHP 5.x, MySQL 5.x]
                              [Apache 2.2.x, PHP 5.x, MySQL 5.x]
                              [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

                              Comment

                              Working...
                              X