R: Icon disappear after using MYSQL for XDATA
Andreoni Antonella
andreoni at ksolutions.it
Wed Aug 4 13:12:50 CEST 2004
Nagios will read xdata from MySQL DB tables so you have to insert your xdata in hostextinfo table in your MySQL DB
you have to connect to your DB, you should find a table called hostextinfo (and also serviceextinfo)
mysql> describe hostextinfo;
+----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| host_name | varchar(75) | | | | |
| notes_url | varchar(128) | | | | |
| icon_image | varchar(32) | | | | |
| vrml_image | varchar(32) | | | | |
| gd2_icon_image | varchar(32) | | | | |
| icon_image_alt | varchar(128) | | | | |
| x_2d | int(11) | | | -1 | |
| y_2d | int(11) | | | -1 | |
| x_3d | double(16,4) | | | -1.0000 | |
| y_3d | double(16,4) | | | -1.0000 | |
| z_3d | double(16,4) | | | -1.0000 | |
| have_2d_coords | tinyint(4) | | | 0 | |
| have_3d_coords | tinyint(4) | | | 0 | |
+----------------+--------------+------+-----+---------+-------+
13 rows in set (0.02 sec)
then you have to insert your xdata for all your hosts
this is an example of insert command for one of my hosts
mysql> insert into hostextinfo values ('PESM0005','http://xxx.xxx.xxx.xxx/cgi-bin/PESM0005-rrd.cgi/PESM0005_se00_locIfInOutBitsSec/','router40.png','','router40.gd2','PESM0005',200,200,100.0,100.0,300.0,100,100);
if you have lots of hosts I suggest you to write a text file with insert commands for all your hosts and input it to mysql
hope this helps
Antonella
---------------------------------------------
Antonella Andreoni
System Engineer
KSOLUTIONS S.p.A.
Via Lenin, 132/26
56017 San Martino Ulmiano (PI) - Italy
Tel. +39 50 898111
Fax +39 50 861200
E-mail: andreoni at ksolutions.it
http://www.ksolutions.it <http://www.ksolutions.it/>
---------------------------------------------
-----Messaggio originale-----
Da: Christopher D. Chandler [mailto:chris at dhinnovations.com]
Inviato: martedì 3 agosto 2004 23.57
A: nagios-users at lists.sourceforge.net
Oggetto: [Nagios-users] Icon disappear after using MYSQL for XDATA
To Nagios Support:
I have recently complied the nagios bin to use MYSQL for xdata upon doing so I have lost all my icons for my status map. All the host have a black question mark on top of them. Can anyone help get my icons back. Below are the configuration files that I am using.
Thanks - Chris
CONFIG.STATUS
./configure --disable-statuswrl --enable-embedded-perl --with-perlcache --with-file-perfdata --with-mysql-xdata
CGI.CFG
xedtemplate_config_file=/usr/local/nagios/etc/hostextinfo.cfg
HOSTEXTINFO.CFG
# DH01 Description
define hostextinfo{
host_name dh01
icon_image win40.jpg
icon_image_alt DH01
vrml_image win40.jpg
statusmap_image win40.jpg
gd2_image win40.jpg
register 1
}
# DH02 Description
define hostextinfo{
host_name dh02
icon_image win40.jpg
icon_image_alt DH02
vrml_image win40.jpg
statusmap_image win40.jpg
gd2_image win40.jpg
register 1
}
# DH03 Description
define hostextinfo{
host_name dh03
icon_image redhat.jpg
icon_image_alt DH03
vrml_image redhat.jpg
statusmap_image redhat.jpg
gd2_image redhat.jpg
register 1
}
# DH04 Description
define hostextinfo{
host_name dh04
icon_image redhat.jpg
icon_image_alt DH01
vrml_image redhat.jpg
statusmap_image redhat.jpg
gd2_image redhat.jpg
register 1
}
Christopher D. Chandler Managing Partner
Office: 919-481-9876
Mobile: 919-274-7684
<mailto:chris at dhinnovations.com> chris at dhinnovations.com
DH Innovations, LLC
Post Office Box 5335 | Cary, North Carolina 27512
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040804/266a2867/attachment.html>
More information about the Users
mailing list