Could not find any hostgroup matching 'allhosts'

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2














I've just started configuring Nagios from scratch, and I'm new at this.



I've been getting this error after adding objects/printer.cfg



Error: Could not find any hostgroup matching 'allhosts'
(config file '/etc/nagios3/objects/printer.cfg', starting on line 1)
Error processing object config files!


And this is the content of the printer.cfg



define host
use generic-host ; Inherit default values from a template
host_name Printer_klen ; The name we're giving to this printer
alias Printer_klen ; A longer name associated with the printer
address 10.1.0.45 ; IP address of the printer
hostgroups allhosts ; Host groups this printer is associated with


define service
use generic-service ; Inherit values from a template
host_name Printer_klen ; The name of the host the service is associated with
service_description Printer Status ; The service description
check_command check_Printer_klen!-C public ; The command used to monitor the service
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined


define service
use generic-service
host_name Printer_klen
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1










share|improve this question




























    2














    I've just started configuring Nagios from scratch, and I'm new at this.



    I've been getting this error after adding objects/printer.cfg



    Error: Could not find any hostgroup matching 'allhosts'
    (config file '/etc/nagios3/objects/printer.cfg', starting on line 1)
    Error processing object config files!


    And this is the content of the printer.cfg



    define host
    use generic-host ; Inherit default values from a template
    host_name Printer_klen ; The name we're giving to this printer
    alias Printer_klen ; A longer name associated with the printer
    address 10.1.0.45 ; IP address of the printer
    hostgroups allhosts ; Host groups this printer is associated with


    define service
    use generic-service ; Inherit values from a template
    host_name Printer_klen ; The name of the host the service is associated with
    service_description Printer Status ; The service description
    check_command check_Printer_klen!-C public ; The command used to monitor the service
    normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
    retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined


    define service
    use generic-service
    host_name Printer_klen
    service_description PING
    check_command check_ping!3000.0,80%!5000.0,100%
    normal_check_interval 10
    retry_check_interval 1










    share|improve this question


























      2












      2








      2







      I've just started configuring Nagios from scratch, and I'm new at this.



      I've been getting this error after adding objects/printer.cfg



      Error: Could not find any hostgroup matching 'allhosts'
      (config file '/etc/nagios3/objects/printer.cfg', starting on line 1)
      Error processing object config files!


      And this is the content of the printer.cfg



      define host
      use generic-host ; Inherit default values from a template
      host_name Printer_klen ; The name we're giving to this printer
      alias Printer_klen ; A longer name associated with the printer
      address 10.1.0.45 ; IP address of the printer
      hostgroups allhosts ; Host groups this printer is associated with


      define service
      use generic-service ; Inherit values from a template
      host_name Printer_klen ; The name of the host the service is associated with
      service_description Printer Status ; The service description
      check_command check_Printer_klen!-C public ; The command used to monitor the service
      normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
      retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined


      define service
      use generic-service
      host_name Printer_klen
      service_description PING
      check_command check_ping!3000.0,80%!5000.0,100%
      normal_check_interval 10
      retry_check_interval 1










      share|improve this question















      I've just started configuring Nagios from scratch, and I'm new at this.



      I've been getting this error after adding objects/printer.cfg



      Error: Could not find any hostgroup matching 'allhosts'
      (config file '/etc/nagios3/objects/printer.cfg', starting on line 1)
      Error processing object config files!


      And this is the content of the printer.cfg



      define host
      use generic-host ; Inherit default values from a template
      host_name Printer_klen ; The name we're giving to this printer
      alias Printer_klen ; A longer name associated with the printer
      address 10.1.0.45 ; IP address of the printer
      hostgroups allhosts ; Host groups this printer is associated with


      define service
      use generic-service ; Inherit values from a template
      host_name Printer_klen ; The name of the host the service is associated with
      service_description Printer Status ; The service description
      check_command check_Printer_klen!-C public ; The command used to monitor the service
      normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
      retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined


      define service
      use generic-service
      host_name Printer_klen
      service_description PING
      check_command check_ping!3000.0,80%!5000.0,100%
      normal_check_interval 10
      retry_check_interval 1







      debian nagios






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 9 '13 at 22:45









      slm

      246k66507673




      246k66507673










      asked Nov 9 '13 at 10:46









      Rene Brakus

      13927




      13927




















          1 Answer
          1






          active

          oldest

          votes


















          2














          The problem



          The error is actually pretty self explanatory.




          Error: Could not find any hostgroup matching 'allhosts'




          You have this line in your define host... block:



          hostgroups allhosts ; Host groups this printer is associated with


          Solution



          You need to create a hostgroup called allhosts.



          In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.



          Example



          define hostgroup
          hostgroup_name allhosts
          alias All Hosts






          share|improve this answer






















          • I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
            – Rene Brakus
            Nov 11 '13 at 8:52






          • 1




            @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
            – slm
            Nov 11 '13 at 13:50











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f99556%2fcould-not-find-any-hostgroup-matching-allhosts%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          The problem



          The error is actually pretty self explanatory.




          Error: Could not find any hostgroup matching 'allhosts'




          You have this line in your define host... block:



          hostgroups allhosts ; Host groups this printer is associated with


          Solution



          You need to create a hostgroup called allhosts.



          In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.



          Example



          define hostgroup
          hostgroup_name allhosts
          alias All Hosts






          share|improve this answer






















          • I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
            – Rene Brakus
            Nov 11 '13 at 8:52






          • 1




            @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
            – slm
            Nov 11 '13 at 13:50
















          2














          The problem



          The error is actually pretty self explanatory.




          Error: Could not find any hostgroup matching 'allhosts'




          You have this line in your define host... block:



          hostgroups allhosts ; Host groups this printer is associated with


          Solution



          You need to create a hostgroup called allhosts.



          In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.



          Example



          define hostgroup
          hostgroup_name allhosts
          alias All Hosts






          share|improve this answer






















          • I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
            – Rene Brakus
            Nov 11 '13 at 8:52






          • 1




            @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
            – slm
            Nov 11 '13 at 13:50














          2












          2








          2






          The problem



          The error is actually pretty self explanatory.




          Error: Could not find any hostgroup matching 'allhosts'




          You have this line in your define host... block:



          hostgroups allhosts ; Host groups this printer is associated with


          Solution



          You need to create a hostgroup called allhosts.



          In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.



          Example



          define hostgroup
          hostgroup_name allhosts
          alias All Hosts






          share|improve this answer














          The problem



          The error is actually pretty self explanatory.




          Error: Could not find any hostgroup matching 'allhosts'




          You have this line in your define host... block:



          hostgroups allhosts ; Host groups this printer is associated with


          Solution



          You need to create a hostgroup called allhosts.



          In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.



          Example



          define hostgroup
          hostgroup_name allhosts
          alias All Hosts







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 9 '13 at 22:52

























          answered Nov 9 '13 at 22:40









          slm

          246k66507673




          246k66507673











          • I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
            – Rene Brakus
            Nov 11 '13 at 8:52






          • 1




            @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
            – slm
            Nov 11 '13 at 13:50

















          • I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
            – Rene Brakus
            Nov 11 '13 at 8:52






          • 1




            @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
            – slm
            Nov 11 '13 at 13:50
















          I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
          – Rene Brakus
          Nov 11 '13 at 8:52




          I've just installed Nagios 3 days ago, and I've been looking at the documentation - but I got stuck on this part. Anyway thank you for taking the time to answer this!
          – Rene Brakus
          Nov 11 '13 at 8:52




          1




          1




          @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
          – slm
          Nov 11 '13 at 13:50





          @ReneBrakus - You're welcome. Yes I've been using Nagios for 10+ years, it's extremely powerful but takes a fair amount of time to learn and grok. Good luck!
          – slm
          Nov 11 '13 at 13:50


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f99556%2fcould-not-find-any-hostgroup-matching-allhosts%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay