[icinga-users] no data in icinga-web

Philipp Herz - Profihost AG p.herz at profihost.ag
Wed Aug 31 09:37:51 CEST 2011


Hi,

maybe I am wrong, but what about icinga.cfg.

Just to be sure. Is there a line (around 250) where you enabled the so 
called "borker_module" like

broker_module=/usr/local/icinga/bin/idomod.o 
config_file=/usr/local/icinga/etc/idomod.cfg

Another option might be to enable

cfg_dir=/usr/local/icinga/etc/modules

around line 55.

kind regards - Philipp

Am 31.08.2011 09:07, schrieb Michael Friedrich:
> Michael Friedrich wrote:
>> John Larsen wrote:
>>> Ok I downloaded the api and installed as per instructions:
>>>
>>> ./configure --datarootdir=/usr/local/icinga/share \
>>>       --sysconfdir=/usr/local/icinga/etc \
>>>       --with-command-user=icinga-cmd \
>>>       --with-command-group=icinga-cmd \
>>>       --with-icinga-user=icinga \
>>>       --with-icinga-group=icinga \
>>>       --with-web-user=www-data \
>>>       --with-web-group=www-data
>>> and then make install
>>>
>>> restarted ido2db and icinga.
>>>
>>> Still no data.
>> no no no.
>>
>> you need the core dumping data to idomod (loaded neb module) writing to
>> ido.sock and ido2db reading from that, pushing to your database. if that
>> does not happen for various reasons, you don't have any data in the
>> database. it doesn't matter if you change the api, or web install or
>> whatever, if you use the queries / view on the database i tried to give
>> you. the web does not source from any other config/historical/status
>> information than idoutils db.
>>
>> so.
>>
>> show me the following outputs
>>
>> cat /var/log/messages | grep icinga
>>
>> cat /var/log/messages | grep iido
>
> cat /var/log/messages | grep ido
>
>> ps aux | grep ido
>>
>>
>>> John Kip Larsen
>>> Integration/Deployment Engineer
>>> Addolux LLC
>>>
>>>
>>>
>>>
>>> On Aug 30, 2011, at 12:41 PM, Michael Friedrich wrote:
>>>
>>>> hi,
>>>>
>>>> On 30.08.2011 19:09, John Larsen wrote:
>>>>> icinga cookbook: http://community.opscode.com/cookbooks/icinga
>>>> ah ok. i wasn't aware of that, thanks for the pointer!
>>>>
>>>>> I just upgraded to 1.5 by changing version in the attributes.
>>>>>
>>>>> ok icinga_objects table does exist, but error is still the same.
>>>>> ERROR 1146 (42S02): Table 'icinga.icinga_ojects' doesn't exist
>>>> fix the typo in the query i gave you and try to re-run. or open the the
>>>> mysql db with your preferred gui and check for data. sending sql queries
>>>> is the easiest - if not adding typos.
>>>>> Im not sure which sql to check for that grml* typo. Could you point me to it?
>>>> sorry. "*grml*" is an expression in german language for being annoyed. i
>>>> was a bit tired today.
>>>>
>>>>> related to make db-doc2sql?
>>>> that is icinga-web only, you won't find that with core+idoutils. forget
>>>> that for now.
>>>>> or icinga-core/module/idoutils/db/mysql/mysql.sql?
>>>>>
>>>>> CREATE TABLE IF NOT EXISTS icinga_objects (
>>>>>      object_id serial,
>>>>>      instance_id bigint unsigned default 0,
>>>>>      objecttype_id bigint unsigned default 0,
>>>>>      name1 varchar(128) character set latin1 collate latin1_general_cs  default '',
>>>>>      name2 varchar(128) character set latin1 collate latin1_general_cs default NULL,
>>>>>      is_active smallint default 0,
>>>>>      PRIMARY KEY  (object_id),
>>>>>      KEY objecttype_id (objecttype_id,name1,name2)
>>>>> ) ENGINE=InnoDB  COMMENT='Current and historical objects of all kinds';
>>>> the sql query joins 2 tables
>>>>
>>>> - hosts
>>>> - objects
>>>>
>>>> icinga idoutils saves hosts, services, contacts, timeperiods, etc as
>>>> objects in the database table, and creates a relation to the config
>>>> table "icinga_hosts" where you will find the more attributes on the host
>>>> itsself.
>>>> within the objects table, name1 = hostname, name2 = null (for hosts, for
>>>> services it will be service desc). the flag is_active will tell you if
>>>> the core dumped config still is in use, or if the information remains
>>>> outdated (changed previous configs, removed a host, or similar).
>>>> the object_id is the primary key with matches on the foreign
>>>> host_object_id key in the icinga_hosts table. therefore it is being used
>>>> as join condition, providing the correct data then - selecting by a
>>>> hostname (name1) but getting all valuable information to compare with
>>>> the objects.cache the core is using to store it's object configuration
>>>> locally. you can then compare if the dumped configuration in the
>>>> database is accurate or not.
>>>>
>>>> if you wanna check for the status of a host/service instead, you will
>>>> need to query the icinga_hoststatus table, again using the join with the
>>>> icinga_objects table. you can still use icinga_hosts as secondary join
>>>> to gather even more valuable information. this is basically the way
>>>> icinga-web fetches its data.
>>>>
>>>> select *
>>>> from icinga_hosts
>>>> join icinga_objects
>>>> on icinga_hosts.host_object_id=icinga_objects.object_id
>>>> join icinga_hoststatus
>>>> on icinga_hoststatus.host_object_id=icinga_objects.object_id
>>>> where icinga_objects.name1='YOURHOSTNAME'
>>>> and is_active=1;
>>>>
>>>> i've also updated the icinga-web testing guide with it
>>>>
>>>> https://wiki.icinga.org/display/Dev/Icinga+Web+Testing
>>>>
>>>> feel free to propose further tests for that, if applicable on resolving
>>>> your error.
>>>>
>>>> kind regards,
>>>> Michael
>>>>
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>> John
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Aug 30, 2011, at 9:31 AM, Michael Friedrich wrote:
>>>>>
>>>>>> John Larsen wrote:
>>>>>>> Hello Michael,
>>>>>>>
>>>>>>> ido2db is running yes
>>>>>>> idomod was not enabled. I have mv module/idoutils.cfg_sample to idoutils.cfg
>>>>>>> ido2db.cfg has correct mysql config.
>>>>>>>
>>>>>>> After the changes above, I have restarted ido2db and icinga. But still something missing.
>>>>>> what's the syslog saying about idomod and ido2db?
>>>>>>
>>>>>>> mysql>      use icinga;
>>>>>>> Reading table information for completion of table and column names
>>>>>>> You can turn off this feature to get a quicker startup with -A
>>>>>>>
>>>>>>> Database changed
>>>>>>> mysql>      select * from icinga_hosts join icinga_ojects on  host_object_id=object_id where name1='yourhostname' and is_active=1;
>>>>>>> ERROR 1146 (42S02): Table 'icinga.icinga_ojects' doesn't exist
>>>>>> *grml* that was a typo - it's icinga_objects. verify that in your
>>>>>> imported sql schema with show create tables; ...
>>>>>>
>>>>>>> The reason for 1.4.2 is because i am using icinga chef cookbook that i started out with. I will update it to install 1.5.
>>>>>> icinga chef cookbook? url?
>>>>>>
>>>>>>> John
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Aug 30, 2011, at 12:49 AM, Michael Friedrich wrote:
>>>>>>>
>>>>>>>> John Larsen wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I am very new to this and have spent a lot of time going through the documentation. I still cannot figure this one out.
>>>>>>>>>
>>>>>>>>> I had installed core with IDOUtils
>>>>>>>>> then installed new web frontend.
>>>>>>>>>
>>>>>>>>> However, the problem I am having is core doesn't seem to be writing data to icinga database so that icinga-web can pull from. I am not exactly sure how it works because the docs seem to be scattered on this subject. I am assuming the ido2db is responsible for pushing data from core to incinga database. I have configured contacts, hosts, commands and services within /usr/local/icinga/etc/ and while I can see this data in the cgi web, there is nothing in the tables on icinga db for icinga-web to draw from.
>>>>>>>>>
>>>>>>>>> Any ideas what i might be missing?
>>>>>>>> ido2db running?
>>>>>>>> idomod enabled through icinga.cfg or as module/idoutils.cfg ?
>>>>>>>> logs stating errors?
>>>>>>>> mysql>      select * from icinga_hosts join icinga_ojects on
>>>>>>>> host_object_id=object_id where name1='yourhostname' and is_active=1;
>>>>>>>>
>>>>>>>> https://wiki.icinga.org/display/Dev/Icinga+Web+Testing
>>>>>>>>> running ubuntu server with php, mysql
>>>>>>>>>
>>>>>>>>> icinga-core 1.4.2
>>>>>>>> why not 1.5.0 for the core?
>>>>>>>>
>>>>>>>>> icinga-web 1.5.1
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> John
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>>>>>>> Finally, a world-class log management solution at an even better
>>>>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>>>>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>>>>>>> _______________________________________________
>>>>>>>>> icinga-users mailing list
>>>>>>>>> icinga-users at lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>>>>>>>
>>>>>>>> --
>>>>>>>> DI (FH) Michael Friedrich
>>>>>>>>
>>>>>>>> Vienna University Computer Center
>>>>>>>> Universitaetsstrasse 7 A-1010 Vienna, Austria
>>>>>>>>
>>>>>>>> email: 	michael.friedrich at univie.ac.at
>>>>>>>> phone: 	+43 1 4277 14359
>>>>>>>> mobile: +43 664 60277 14359
>>>>>>>> fax: 	+43 1 4277 14338
>>>>>>>> web:	http://www.univie.ac.at/zid
>>>>>>>> 	http://www.aco.net
>>>>>>>>
>>>>>>>> Icinga Core&       IDOUtils Developer
>>>>>>>> http://www.icinga.org
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>>>>>> Finally, a world-class log management solution at an even better
>>>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>>>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>>>>>> _______________________________________________
>>>>>>>> icinga-users mailing list
>>>>>>>> icinga-users at lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>>>>> ------------------------------------------------------------------------------
>>>>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>>>>> Finally, a world-class log management solution at an even better
>>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>>>>> _______________________________________________
>>>>>>> icinga-users mailing list
>>>>>>> icinga-users at lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>>>>>
>>>>>> --
>>>>>> DI (FH) Michael Friedrich
>>>>>>
>>>>>> Vienna University Computer Center
>>>>>> Universitaetsstrasse 7 A-1010 Vienna, Austria
>>>>>>
>>>>>> email: 	michael.friedrich at univie.ac.at
>>>>>> phone: 	+43 1 4277 14359
>>>>>> mobile: +43 664 60277 14359
>>>>>> fax: 	+43 1 4277 14338
>>>>>> web:	http://www.univie.ac.at/zid
>>>>>> 	http://www.aco.net
>>>>>>
>>>>>> Icinga Core&      IDOUtils Developer
>>>>>> http://www.icinga.org
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>>>> Finally, a world-class log management solution at an even better
>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>>>> _______________________________________________
>>>>>> icinga-users mailing list
>>>>>> icinga-users at lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>>> ------------------------------------------------------------------------------
>>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>>> Finally, a world-class log management solution at an even better
>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>>> _______________________________________________
>>>>> icinga-users mailing list
>>>>> icinga-users at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>>>
>>>> --
>>>> DI (FH) Michael Friedrich
>>>>
>>>> Vienna University Computer Center
>>>> Universitaetsstrasse 7 A-1010 Vienna, Austria
>>>>
>>>> email:     michael.friedrich at univie.ac.at
>>>> phone:     +43 1 4277 14359
>>>> mobile:    +43 664 60277 14359
>>>> fax:	   +43 1 4277 14338
>>>> web:       http://www.univie.ac.at/zid
>>>>               http://www.aco.net
>>>>
>>>> Icinga Core&     IDOUtils Developer
>>>> http://www.icinga.org
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Special Offer -- Download ArcSight Logger for FREE!
>>>> Finally, a world-class log management solution at an even better
>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>>> download Logger. Secure your free ArcSight Logger TODAY!
>>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>>> _______________________________________________
>>>> icinga-users mailing list
>>>> icinga-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>> ------------------------------------------------------------------------------
>>> Special Offer -- Download ArcSight Logger for FREE!
>>> Finally, a world-class log management solution at an even better
>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>>> download Logger. Secure your free ArcSight Logger TODAY!
>>> http://p.sf.net/sfu/arcsisghtdev2dev
>>> _______________________________________________
>>> icinga-users mailing list
>>> icinga-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/icinga-users
>>>
>>
>
>




More information about the icinga-users mailing list