Announcement

Collapse
No announcement yet.

CLAPI imports all except services

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

  • CLAPI imports all except services

    Hi everybody.

    I have an old server that i need to migrate to a new machine. The old server have ubuntu 12.04 with nagios 3.4.1, ndo, and centreon 2.6.1 (initially was 2.3.4 but the last months it was updated to 2.6.1) have 1023 hosts and 5022 services.
    The new server its a fresh install with ubuntu server 14.04, nagios 3.5.1 , ndo, and centreon 2.6.1. Empty with only 1 host (itself).

    I need to migrate data from old server to new, both have CLAPI 1.8.0 installed.
    The clapi export command in the old server make me a file with all data but the clapi import in the new server doesn't importa all data. Apparently import all but services.
    I tried to load services.cfg in (Configuration --> Load) but it doesnt work. (Template based method file, file services.cfg).

    I appreciate some help on how i can import these services.
    I think it's the only thing missing

    Thanks.
    Last edited by rsaez; 29 September 2015, 10:59.

  • #2
    Hi

    It's really strange that your new server doesn't import services.

    Can you send me by MP your configuration to try to import it on my VM ?
    Centreon Syslog Module Manager/Developper
    Centreon E2S Module Manager/Developper
    Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
    Nagios 3.x et NDOutil 1.x

    Comment


    • #3
      No problem I'll send you a MP with the clapi export file.



      EDIT: Mmmh the forum is telling me that you don't accept PM XD
      Last edited by rsaez; 29 September 2015, 15:48.

      Comment


      • #4
        Tu peux rester ?
        Centreon Syslog Module Manager/Developper
        Centreon E2S Module Manager/Developper
        Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
        Nagios 3.x et NDOutil 1.x

        Comment


        • #5
          PM sent

          Comment


          • #6
            Je travaille sur ton sujet et effectivement j'ai le même soucis.
            Je te tiens au jus.
            Centreon Syslog Module Manager/Developper
            Centreon E2S Module Manager/Developper
            Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
            Nagios 3.x et NDOutil 1.x

            Comment


            • #7
              Centeron CLAPI possède une limitation actuellement : il faut impérativement qu'un service hérite d'un modèle de service pour être importé.

              Or tous tes services n'en possède pas puisque ce sont des configurations unitaires.

              Je te conseille de créer un modèle de service (coquille vide) puis avec une regexp de transformer les lignes:

              Code:
              SERVICE;ADD;hsot-name;service-name;
              Par:
              Code:
              SERVICE;ADD;hsot-name;service-name;nouveau-modele-service
              Centreon Syslog Module Manager/Developper
              Centreon E2S Module Manager/Developper
              Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
              Nagios 3.x et NDOutil 1.x

              Comment


              • #8
                wow, thak you very much.

                I try to modify the lines adding the model service and follow your indications.

                Comment


                • #9
                  Hi

                  What is the result ?
                  Centreon Syslog Module Manager/Developper
                  Centreon E2S Module Manager/Developper
                  Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
                  Nagios 3.x et NDOutil 1.x

                  Comment


                  • #10
                    Sorry, I could not even test it in the laboratory.
                    Today I hope to do the test in the laboratory, then I will comment if it works

                    THanks.

                    Comment


                    • #11
                      I just launching import again a few minutes ago.

                      Before i created a new service called "service_model" in my new centreon and then I have prepared the file by adding at the end of each line that had SERVICE;ADD; in it the text "service_model".


                      The command i used (if it helps others) to automatically add the text at the end of each line (where SERVICE;ADD; exists) is:

                      awk '/SERVICE;ADD;/{print $0 "service_model"; next}1 ' clapi_export_08_10

                      (clapi_export_08_10 is my file exported with clapi from my "old" centreon).


                      clarification:
                      awk '/search_pattern/{print $0 "text_to_find"; next}1' file


                      When it finish i come here to write the result


                      PS: Sorry for my english if it's wrong.

                      Comment

                      Working...
                      X