On Mon, 4 Mar 2013, Mike Dopp wrote:

> I removed all cfg files out of the objects folder and ran
> verification " /usr/sbin/icinga -v /etc/icinga/icinga.cfg
>
> No errors and of course no objects. Cleared the cache and
> restarted icinga. Icinga web came up with 0 hosts but worked
> just like before.

    Does your icinga.cfg file have any "cfg_dir" declarations
in it, and, if so, do those directories have any *.cfg files
in them.  If so, those may be throwing problems your way.

    A very common idiom is to set templates up so that the
declarations contained therein will be inherited "downwards"
to individual objects.  The nasty bit about those is that if
some of the *really* key declarations (e.g. host_name or
service_description) are erroneously defined in the template
then it is possible to get "duplicate" errors.

> Next I added a windows.cfg file inside the objects folder gave it:
> Define host{
>                use windows-server

    The notion of "windows-server" should be a template, and that
template should have *nothing* in it that refers to a host_name
or alias.

>                host_name Happy
>                alias Gilmore
>                address 172.21.0.16
> }

    The rest of that host declaration looks valid so long as all
the other bits are properly inherited from "windows-server".  In
the above configuration, I personally would have used a host-
declaration file in a so-listed "cfg_dir" declaration in icinga.cfg
named {host}.cfg.

    Make sure that your templates do not contain the "host_name"
or "alias" declarations.

    Cheers!

+------------------------------------------------+---------------------+
| Carl Richard Friend (UNIX Sysadmin)            | West Boylston       |
| Minicomputer Collector / Enthusiast            | Massachusetts, USA  |
| mailto:crfri...@rcn.com                        +---------------------+
| http://users.rcn.com/crfriend/museum           | ICBM: 42:22N 71:47W |
+------------------------------------------------+---------------------+

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to