Copied and modified localhost.cfg, but new host stays unmonitored

Matej weselkorula at gmail.com
Fri Jul 24 16:32:19 CEST 2009


Nagios has a extensive documentation online. See if this helps.

http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#hostgroup

regards
Matej Vesel


On Fri, Jul 24, 2009 at 4:29 PM, Dayo Adewunmi <contactdayo at gmail.com>wrote:

> How do I specify the hostgroup in a separate file?
>
> Matej wrote:
>
>> linux-server, is the default host definition template. I think you cant
>> use the same name for a template and a hostgroup. When adding host you
>> specify a host template to use with a line like this
>>
>> use                     linux-server
>>
>> I specify the hostgroup in a seperate file, where I state the name of the
>> group and its members. I never do it with host definitions.
>>
>> later
>> Matej
>>
>>
>>
>>
>> On Fri, Jul 24, 2009 at 1:12 PM, Dayo Adewunmi <contactdayo at gmail.com<mailto:
>> contactdayo at gmail.com>> wrote:
>>
>>    This is what I got: http://pastebin.com/m761159a1
>>
>>    So, in ebola.cfg I commented out
>>
>>    hostgroup_name  linux-servers ; The name of the hostgroup
>>
>>    And now it works. How come?
>>
>>
>>
>>    Matej wrote:
>>
>>        start nagios with
>>        nagios -v nagios.cfg
>>
>>        You have a error  in you config file. The above command will
>>        provide you with a detailed output, and you will see in what
>>        line the error is .. Go and fix it and retry.
>>
>>
>>
>>        On Fri, Jul 24, 2009 at 12:44 PM, Dayo Adewunmi
>>        <contactdayo at gmail.com <mailto:contactdayo at gmail.com>
>>        <mailto:contactdayo at gmail.com <mailto:contactdayo at gmail.com>>>
>>        wrote:
>>
>>           Hi
>>
>>           I tried adding either of these lines to nagios.cfg:
>>
>>           cfg_file=/usr/local/nagios/etc/objects/ebola.cfg
>>           cfg_dir=/usr/local/nagios/etc/objects/desktops
>>
>>           And when I restart nagios this is what happens:
>>
>>           "Running configuration check... CONFIG ERROR!  Restart aborted.
>>            Check your Nagios configuration."
>>
>>
>>           Matej wrote:
>>
>>               Check the Configuration tab in nagios web interface,
>>        there it
>>               shows the "live" config aka. what it read and loaded.
>>               You probably need to add the new config  to your nagios.cfg
>>               file, so Nagios can read it. You also have a parameter in
>>               nagios.cfg, that you can set to a folder, and it reads all
>>               *.cfg files in that folder, thaat way you dont need to
>>        specify
>>               all config files seperatly.
>>
>>               On Fri, Jul 24, 2009 at 11:52 AM, Dayo Adewunmi
>>               <contactdayo at gmail.com <mailto:contactdayo at gmail.com>
>>        <mailto:contactdayo at gmail.com <mailto:contactdayo at gmail.com>>
>>               <mailto:contactdayo at gmail.com
>>        <mailto:contactdayo at gmail.com> <mailto:contactdayo at gmail.com
>>        <mailto:contactdayo at gmail.com>>>>
>>
>>               wrote:
>>
>>                  Hi all
>>
>>                  I copied localhost.cfg to create an object
>>        definition for a
>>               new host:
>>                  http://pastebin.com/f21c9df1c
>>
>>                  No matter how often I restart nagios, the new host
>>        isn't being
>>                  monitored.
>>
>>                  Best regards
>>
>>                  Dayo Adewunmi
>>
>>
>>  ------------------------------------------------------------------------------
>>                  _______________________________________________
>>                  Nagios-users mailing list
>>                  Nagios-users at lists.sourceforge.net
>>        <mailto:Nagios-users at lists.sourceforge.net>
>>               <mailto:Nagios-users at lists.sourceforge.net
>>        <mailto:Nagios-users at lists.sourceforge.net>>
>>                  <mailto:Nagios-users at lists.sourceforge.net
>>        <mailto:Nagios-users at lists.sourceforge.net>
>>               <mailto:Nagios-users at lists.sourceforge.net
>>        <mailto:Nagios-users at lists.sourceforge.net>>>
>>
>>
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>                  ::: Please include Nagios version, plugin version
>>        (-v) and
>>               OS when
>>                  reporting any issue.
>>                  ::: Messages without supporting info will risk being
>>        sent
>>               to /dev/null
>>
>>
>>
>>
>>               --        lp
>>               Matej
>>
>>
>>
>>
>>
>>        --        lp
>>        Matej
>>
>>
>>
>>
>>
>> --
>> lp
>> Matej
>>
>
>


-- 
lp
Matej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090724/bd838707/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list