Discussion:
[Nagios-users] nagios -->> ndo2db -->> centreon
James Pifer
2009-06-03 00:15:19 UTC
Permalink
Wondering if anyone here can help me with this. I'm trying to get nagios
data written to ndo2db for centreon. Unfortunately the folks on the
centreon forum have not been very helpful. If anyone here could help I'd
appreciate it.

My software versions are:
sles10sp2 x64
nagios-plugins-1.4.5-16.13
nagios-2.6-13.16
nagios-plugins-extras-1.4.5-16.13
nagios-www-2.6-13.16
ndoutils-1.4b7

I have these lines in my nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg
event_broker_options=-1

My /etc/nagios/ndomod.cfg is:
instance_name=Central
output_type=tcpsocket
output=127.0.0.1
tcp_port=5668
output_buffer_items=5000
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=900
data_processing_options=-1
config_output_options=3

Really not sure if that stuff is correct or not. I'm not sure where the
instance_name comes from or if the tcp_port is correct. My ndo database
is in mysql and called ndo and I can login using the mysql client with
the login that's specified in /usr/local/nagios/etc/ndo2db.cfg.


I get this over and over in my nagios log file:
[1243973491] ndomod: Still unable to connect to data sink. 6605297 items lost, 5000 queued items to flush.
[1243974404] ndomod: Still unable to connect to data sink. 6608938 items lost, 5000 queued items to flush.
[1243975317] ndomod: Still unable to connect to data sink. 6612568 items lost, 5000 queued items to flush.
[1243976229] ndomod: Still unable to connect to data sink. 6616195 items lost, 5000 queued items to flush.
[1243976463] Auto-save of retention data completed successfully.
[1243977141] ndomod: Still unable to connect to data sink. 6619829 items lost, 5000 queued items to flush.
[1243978053] ndomod: Still unable to connect to data sink. 6623477 items lost, 5000 queued items to flush.
[1243978965] ndomod: Still unable to connect to data sink. 6627104 items lost, 5000 queued items to flush.
[1243979877] ndomod: Still unable to connect to data sink. 6630729 items lost, 5000 queued items to flush.
[1243980063] Auto-save of retention data completed successfully.
[1243980789] ndomod: Still unable to connect to data sink. 6634361 items lost, 5000 queued items to flush.
[1243981701] ndomod: Still unable to connect to data sink. 6637988 items lost, 5000 queued items to flush.
[1243982613] ndomod: Still unable to connect to data sink. 6641613 items lost, 5000 queued items to flush.
[1243983525] ndomod: Still unable to connect to data sink. 6645243 items lost, 5000 queued items to flush.
[1243983663] Auto-save of retention data completed successfully.

I'm not sure where else to look for the problem. If anyone has any ideas
or debugging suggestions I'd really appreciate it.

Thanks,
James
Marc Powell
2009-06-03 18:44:42 UTC
Permalink
Post by James Pifer
Wondering if anyone here can help me with this. I'm trying to get nagios
data written to ndo2db for centreon. Unfortunately the folks on the
centreon forum have not been very helpful. If anyone here could help I'd
appreciate it.
[1243983525] ndomod: Still unable to connect to data sink. 6645243
items lost, 5000 queued items to flush.
[1243983663] Auto-save of retention data completed successfully.
I'm not sure where else to look for the problem. If anyone has any ideas
or debugging suggestions I'd really appreciate it.
It looks like ndomod can't talk to ndo2db. Is the ndo2db daemon
running and listening on the specified IP/port? Turn on debug in
ndo2db.cfg and look in /var/log/messages and the debug file for
errors. Check your mysql log for errors as well.

--
Marc
James Pifer
2009-06-04 00:05:29 UTC
Permalink
Post by Marc Powell
Post by James Pifer
[1243983525] ndomod: Still unable to connect to data sink. 6645243
items lost, 5000 queued items to flush.
[1243983663] Auto-save of retention data completed successfully.
I'm not sure where else to look for the problem. If anyone has any ideas
or debugging suggestions I'd really appreciate it.
It looks like ndomod can't talk to ndo2db. Is the ndo2db daemon
running and listening on the specified IP/port? Turn on debug in
ndo2db.cfg and look in /var/log/messages and the debug file for
errors. Check your mysql log for errors as well.
I seem to have made some progress. I had multiple ndomod.cfg and
ndo2db.cfg. Centreon was writing them to one place and ndo was using the
other. I renamed the originals and linked them so they are referencing
the same ones. Now I see this in /var/lib/nagios/nagios.log:
[1244069666] ndomod: Successfully reconnected to data sink! 0 items lost, 57 queued items to flush.
[1244069666] ndomod: Successfully flushed 57 queued items to data sink.
[1244070063] Auto-save of retention data completed successfully.

Unfortunately I still don't see the host I setup in centreon being
monitored by nagios, and it's not listed in nagios' status.log.

I also don't see anything in mysql.log or messages.

Thanks,
James
Simon Finch
2009-06-04 00:19:30 UTC
Permalink
James,

The instance name refers to the Nagios instance id and 'Central' is the default created by Centreon.
Port 5668 is the default port that the NDO broker module will send data to. The corresponding NDO receiver port is defined in the ndo2db.cfg file and these 2 need to match up.

2 things to look at, when you compiled NDO the modules generated were ndomod-2x.o and ndomod-3x.o, your config is referring to ndomod.o, did you rename the compiled module to match ?

Ndo2db does not automatically start, you need to start it and create an init script to start the daemon during boot up.

HTH,



Simon Finch | ESM Specialist

Ground Floor, 4-16 Montgomery St, Kogarah NSW 2217
(+61 2 9952 2574 7 +61 412 256 814
Email: ***@stgeorge.com.au
www.stgeorge.com.au
______________________________________
St.George Bank IT - Good with people. Good with monitoring.
Wondering if anyone here can help me with this. I'm trying to get nagios
data written to ndo2db for centreon. Unfortunately the folks on the
centreon forum have not been very helpful. If anyone here could help I'd
appreciate it.

My software versions are:
sles10sp2 x64
nagios-plugins-1.4.5-16.13
nagios-2.6-13.16
nagios-plugins-extras-1.4.5-16.13
nagios-www-2.6-13.16
ndoutils-1.4b7

I have these lines in my nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/etc/nagios/ndomod.cfg
event_broker_options=-1

My /etc/nagios/ndomod.cfg is:
instance_name=Central
output_type=tcpsocket
output=127.0.0.1
tcp_port=5668
output_buffer_items=5000
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=900
data_processing_options=-1
config_output_options=3

Really not sure if that stuff is correct or not. I'm not sure where the
instance_name comes from or if the tcp_port is correct. My ndo database
is in mysql and called ndo and I can login using the mysql client with
the login that's specified in /usr/local/nagios/etc/ndo2db.cfg.


I get this over and over in my nagios log file:
[1243973491] ndomod: Still unable to connect to data sink. 6605297 items lost, 5000 queued items to flush.
[1243974404] ndomod: Still unable to connect to data sink. 6608938 items lost, 5000 queued items to flush.
[1243975317] ndomod: Still unable to connect to data sink. 6612568 items lost, 5000 queued items to flush.
[1243976229] ndomod: Still unable to connect to data sink. 6616195 items lost, 5000 queued items to flush.
[1243976463] Auto-save of retention data completed successfully.
[1243977141] ndomod: Still unable to connect to data sink. 6619829 items lost, 5000 queued items to flush.
[1243978053] ndomod: Still unable to connect to data sink. 6623477 items lost, 5000 queued items to flush.
[1243978965] ndomod: Still unable to connect to data sink. 6627104 items lost, 5000 queued items to flush.
[1243979877] ndomod: Still unable to connect to data sink. 6630729 items lost, 5000 queued items to flush.
[1243980063] Auto-save of retention data completed successfully.
[1243980789] ndomod: Still unable to connect to data sink. 6634361 items lost, 5000 queued items to flush.
[1243981701] ndomod: Still unable to connect to data sink. 6637988 items lost, 5000 queued items to flush.
[1243982613] ndomod: Still unable to connect to data sink. 6641613 items lost, 5000 queued items to flush.
[1243983525] ndomod: Still unable to connect to data sink. 6645243 items lost, 5000 queued items to flush.
[1243983663] Auto-save of retention data completed successfully.

I'm not sure where else to look for the problem. If anyone has any ideas
or debugging suggestions I'd really appreciate it.

Thanks,
James


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Nagios-users mailing list
Nagios-***@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


*** This is an automatically appended message from St. George ITP. If this email is SPAM please register it with WebSense MailControl by clicking this link https://www.mailcontrol.com/sr/6ov0Ez2Xb2jTndxI!oX7UidyY9wa1yn6sEecMPqOl07mkXxbs3cRt6lJ8LIwaR+er0s3dE0!F2mENNTgBxFzrw== . ***
**********************************************************************
***** IMPORTANT INFORMATION *****
This document should be read only by those persons to whom it is
addressed and its content is not intended for use by any other
persons. If you have received this message in error, please notify
us immediately. Please also destroy and delete the message from
your computer. Any unauthorised form of reproduction of this message
is strictly prohibited.

St George Bank Limited AFSL 240997, Advance Asset Management Limited
AFSL 240902, St George Life Limited AFSL 240900, ASGARD Capital Management Limited
AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for
the proper and complete transmission of the information contained in
this communication, nor for any delay in its receipt.
**********************************************************************
James Pifer
2009-06-04 12:05:01 UTC
Permalink
HTML document attachment (Text.htm)
James,
The instance name refers to the Nagios instance id and 'Central' is
the default created by Centreon.
Port 5668 is the default port that the NDO broker module will send
data to. The corresponding NDO receiver port is defined in the
ndo2db.cfg file and these 2 need to match up.
Yes, these match.
2 things to look at, when you compiled NDO the modules generated were
ndomod-2x.o and ndomod-3x.o, your config is referring to ndomod.o, did
you rename the compiled module to match ?
Yes, using the 2x.o version
Ndo2db does not automatically start, you need to start it and create
an init script to start the daemon during boot up.
Yes, did this and ndo2db is running.

Since yesterday evening I have this in:
/var/lib/nagios/nagios.log


[1244077263] Auto-save of retention data completed successfully.
[1244080863] Auto-save of retention data completed successfully.
[1244084463] Auto-save of retention data completed successfully.
[1244088063] Auto-save of retention data completed successfully.
[1244091663] Auto-save of retention data completed successfully.
[1244095263] Auto-save of retention data completed successfully.
[1244098863] Auto-save of retention data completed successfully.
[1244102463] Auto-save of retention data completed successfully.
[1244106063] Auto-save of retention data completed successfully.
[1244109663] Auto-save of retention data completed successfully.
[1244113263] Auto-save of retention data completed successfully.

But I still have a disconnect somewhere. I'm not getting monitoring
information in centreon for the host I have setup.

Thanks,
James
Marc Powell
2009-06-04 14:21:29 UTC
Permalink
Post by James Pifer
Post by Simon Finch
Ndo2db does not automatically start, you need to start it and create
an init script to start the daemon during boot up.
Yes, did this and ndo2db is running.
But I still have a disconnect somewhere. I'm not getting monitoring
information in centreon for the host I have setup.
If you query the database directly, do you see data?

SELECT * FROM nagios.nagios_hosts WHERE host_name = 'your host_name';

SELECT * FROM nagios.nagios_services s, nagios.nagios_hosts h WHERE
h.display_name='your host_name' AND h.host_object_id=s.host_object_id;

--
Marc
James Pifer
2009-06-04 15:00:09 UTC
Permalink
Post by Marc Powell
Post by James Pifer
Post by Simon Finch
Ndo2db does not automatically start, you need to start it and create
an init script to start the daemon during boot up.
Yes, did this and ndo2db is running.
But I still have a disconnect somewhere. I'm not getting monitoring
information in centreon for the host I have setup.
If you query the database directly, do you see data?
SELECT * FROM nagios.nagios_hosts WHERE host_name = 'your host_name';
SELECT * FROM nagios.nagios_services s, nagios.nagios_hosts h WHERE
h.display_name='your host_name' AND h.host_object_id=s.host_object_id;
host_name is not a valid column (see below). If I select * from
nagios_hosts I only see localhost and Centreon-Server, not the host I
added.

Thanks,
James

mysql> SHOW COLUMNS FROM nagios_hosts;
+-----------------------------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------------------+--------------+------+-----+---------+----------------+
| host_id | int(11) | NO | PRI | NULL | auto_increment |
| instance_id | smallint(6) | NO | MUL | 0 | |
| config_type | smallint(6) | NO | | 0 | |
| host_object_id | int(11) | NO | MUL | 0 | |
| alias | varchar(64) | NO | | | |
| display_name | varchar(64) | NO | MUL | | |
| address | varchar(128) | NO | | | |
| check_command_object_id | int(11) | NO | | 0 | |
| check_command_args | varchar(255) | NO | | | |
| eventhandler_command_object_id | int(11) | NO | | 0 | |
| eventhandler_command_args | varchar(255) | NO | | | |
| notification_timeperiod_object_id | int(11) | NO | | 0 | |
| check_timeperiod_object_id | int(11) | NO | | 0 | |
| failure_prediction_options | varchar(64) | NO | | | |
| check_interval | double | NO | | 0 | |
| retry_interval | double | NO | | 0 | |
| max_check_attempts | smallint(6) | NO | | 0 | |
| first_notification_delay | double | NO | | 0 | |
| notification_interval | double | NO | | 0 | |
| notify_on_down | smallint(6) | NO | | 0 | |
| notify_on_unreachable | smallint(6) | NO | | 0 | |
| notify_on_recovery | smallint(6) | NO | | 0 | |
| notify_on_flapping | smallint(6) | NO | | 0 | |
| notify_on_downtime | smallint(6) | NO | | 0 | |
| stalk_on_up | smallint(6) | NO | | 0 | |
| stalk_on_down | smallint(6) | NO | | 0 | |
| stalk_on_unreachable | smallint(6) | NO | | 0 | |
| flap_detection_enabled | smallint(6) | NO | | 0 | |
| flap_detection_on_up | smallint(6) | NO | | 0 | |
| flap_detection_on_down | smallint(6) | NO | | 0 | |
| flap_detection_on_unreachable | smallint(6) | NO | | 0 | |
| low_flap_threshold | double | NO | | 0 | |
| high_flap_threshold | double | NO | | 0 | |
| process_performance_data | smallint(6) | NO | | 0 | |
| freshness_checks_enabled | smallint(6) | NO | | 0 | |
| freshness_threshold | smallint(6) | NO | | 0 | |
| passive_checks_enabled | smallint(6) | NO | | 0 | |
| event_handler_enabled | smallint(6) | NO | | 0 | |
| active_checks_enabled | smallint(6) | NO | | 0 | |
| retain_status_information | smallint(6) | NO | | 0 | |
| retain_nonstatus_information | smallint(6) | NO | | 0 | |
| notifications_enabled | smallint(6) | NO | | 0 | |
| obsess_over_host | smallint(6) | NO | | 0 | |
| failure_prediction_enabled | smallint(6) | NO | | 0 | |
| notes | varchar(255) | NO | | | |
| notes_url | varchar(255) | NO | | | |
| action_url | varchar(255) | NO | | | |
| icon_image | varchar(255) | NO | | | |
| icon_image_alt | varchar(255) | NO | | | |
| vrml_image | varchar(255) | NO | | | |
| statusmap_image | varchar(255) | NO | | | |
| have_2d_coords | smallint(6) | NO | | 0 | |
| x_2d | smallint(6) | NO | | 0 | |
| y_2d | smallint(6) | NO | | 0 | |
| have_3d_coords | smallint(6) | NO | | 0 | |
| x_3d | double | NO | | 0 | |
| y_3d | double | NO | | 0 | |
| z_3d | double | NO | | 0 | |
+-----------------------------------+--------------+------+-----+---------+----------------+
58 rows in set (0.00 sec)
Marc Powell
2009-06-04 15:19:59 UTC
Permalink
Post by James Pifer
Post by Marc Powell
If you query the database directly, do you see data?
SELECT * FROM nagios.nagios_hosts WHERE host_name = 'your host_name';
SELECT * FROM nagios.nagios_services s, nagios.nagios_hosts h WHERE
h.display_name='your host_name' AND
h.host_object_id=s.host_object_id;
host_name is not a valid column (see below).
Sorry, I did mean display_name there...
Post by James Pifer
If I select * from
nagios_hosts I only see localhost and Centreon-Server, not the host I
added.
And nagios is showing this host in it's GUI?

event_broker_options is still -1? Have you restarted nagios since
fixing the ndo2db issues? I've never used Centreon so I'm just trying
to cover logical things...

--
Marc
James Pifer
2009-06-04 16:10:06 UTC
Permalink
Post by Marc Powell
And nagios is showing this host in it's GUI?
No it doesn't. I had suspected this was an issue a while back, but got
side tracked by all the ndo problems. Any idea how centreon sends the
information to nagios?

Thanks,
James
James Pifer
2009-06-04 16:18:29 UTC
Permalink
Post by Marc Powell
And nagios is showing this host in it's GUI?
I have two nagios hosts.cfg files:
/etc/nagios/hosts.cfg
/usr/local/centreon/filesGeneration/nagiosCFG/1/hosts.cfg

neither of them contains the host I created...

I grepped all of the cfg files and none of them contain it...

ARGH!!!!
James
Romain Le Merlus
2009-06-04 17:05:45 UTC
Permalink
Hi,
Post by James Pifer
/etc/nagios/hosts.cfg
/usr/local/centreon/filesGeneration/nagiosCFG/1/hosts.cfg
neither of them contains the host I created...
I grepped all of the cfg files and none of them contain it...
It seems that you did not generate & restart your configuration from the
main Centreon server ?
Configuration > Nagios > Nagios

Do you select the correct poller on the form ?
Do you have any debug/informations when you run it from Centreon ?

Best regards.
--
Romain LE MERLUS | Directeur des projets

***@merethis.com
Tel. +33 (0)1 49 69 97 12
Mob. +33(0)6 85 05 02 82

MERETHIS est éditeur du logiciel Centreon.
Andrew Davis
2009-06-04 18:02:48 UTC
Permalink
I don't want to come across like a jerk, but wouldn't this better be
discussed on the Centreon site? I understand its built on Nagios, but
I'm thinking you might get better help and support on the Centreon site
itself...

A. Davis
Email: ***@gmail.com

"There is no limit to what a man can accomplish
if he doesn't care who gets the credit." - Ronald Reagan
Post by James Pifer
Hi,
/etc/nagios/hosts.cfg
/usr/local/centreon/filesGeneration/nagiosCFG/1/hosts.cfg
neither of them contains the host I created...
I grepped all of the cfg files and none of them contain it...
It seems that you did not generate & restart your configuration from
the main Centreon server ?
Configuration > Nagios > Nagios
Do you select the correct poller on the form ?
Do you have any debug/informations when you run it from Centreon ?
Best regards.
--
Romain LE MERLUS | Directeur des projets
Tel. +33 (0)1 49 69 97 12
Mob. +33(0)6 85 05 02 82
MERETHIS est éditeur du logiciel Centreon.
------------------------------------------------------------------------
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
------------------------------------------------------------------------
_______________________________________________
Nagios-users mailing list
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
Marc Powell
2009-06-04 18:18:45 UTC
Permalink
Post by Andrew Davis
I don't want to come across like a jerk, but wouldn't this better be
discussed on the Centreon site? I understand its built on Nagios,
but I'm thinking you might get better help and support on the
Centreon site itself..
The OP said in his original post that he started there and didn't get
anywhere. *shrug*

--
Marc
James Pifer
2009-06-04 18:38:15 UTC
Permalink
Post by Marc Powell
Post by Andrew Davis
I don't want to come across like a jerk, but wouldn't this better be
discussed on the Centreon site? I understand its built on Nagios,
but I'm thinking you might get better help and support on the
Centreon site itself..
The OP said in his original post that he started there and didn't get
anywhere. *shrug*
Yes, I spent a couple weeks trying to get help and find answers over
there. I agree that SHOULD be the place. I appreciate the help received
here. See my other post, I think it's very close now...

Thanks,
James
James Pifer
2009-06-05 17:13:38 UTC
Permalink
Post by James Pifer
Post by Marc Powell
Post by Andrew Davis
I don't want to come across like a jerk, but wouldn't this better be
discussed on the Centreon site? I understand its built on Nagios,
but I'm thinking you might get better help and support on the
Centreon site itself..
The OP said in his original post that he started there and didn't get
anywhere. *shrug*
Yes, I spent a couple weeks trying to get help and find answers over
there. I agree that SHOULD be the place. I appreciate the help received
here. See my other post, I think it's very close now...
Thanks for all the help!!! Was able to get everything working.

James
James Pifer
2009-06-09 12:53:41 UTC
Permalink
Post by James Pifer
Thanks for all the help!!! Was able to get everything working.
James
I spoke a little bit too soon. Although a couple of the hosts showed up,
that's all I can get to work. I've added more, and the nagios configs
get updated, yet nagios doesn't show any changes. So I'm missing
something on the nagios/configuration side.

If I take a bracket out of one of the configs, then nagios won't
restart, so I know it's reading these cfg files. In the files
below, srv-xen02.mydomain.com and srv-xen03.mydomain.com are working,
but none of the others are.

If I remove one of these hosts (using centreon frontend) it removes it
from the configs, nagios is restarted, but nagios is not updated. It
still shows the same two hosts.

Anyone know what I might be missing? Here are some of my configs. The
contacts listed in these configs all exist.

Thanks,
James

For example, my config files are at /etc/nagios
#####################################################################
# cat hostgroups.cfg
define hostgroup{
hostgroup_name Linux_Servers
alias All linux servers
members srv-xen02.mydomain.com, srv-xen03.mydomain.com, srv-xen04.mydomain.com, srv-xen05.mydomain.com
}

define hostgroup{
hostgroup_name MY_routers
alias MY routers
members SLW-E11.mydomain.com
}


####################################################################
# cat hosts.cfg

define host{
name generic-host
alias generic-host
check_command check_host_alive
max_check_attempts 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
contact_groups netcool, Supervisors
notification_interval 0
notification_period 24x7
notification_options d,r
notifications_enabled 0
register 0
}

define host{
name Servers-Linux
use generic-host
alias Linux Servers
register 0
}

define host{
host_name srv-xen02.mydomain.com
use Servers-Linux
alias srv-xen02
address 192.168.4.152
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
contact_groups netcool
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}

define host{
host_name srv-xen03.mydomain.com
use Servers-Linux
alias srv-xen03
address 192.168.4.153
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 0
passive_checks_enabled 0
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
contact_groups netcool
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}

define host{
host_name srv-xen04.mydomain.com
use Servers-Linux
alias srv-xen04
address 192.168.4.154
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
contact_groups netcool
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}

define host{
host_name srv-xen05.mydomain.com
use Servers-Linux
alias srv-xen05
address 192.168.4.155
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 0
passive_checks_enabled 0
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
contact_groups netcool
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}

define host{
host_name SLW-E11.mydomain.com
use generic-host
alias SLW-E11
address 10.65.42.1
hostgroups MY_routers
check_command check_host_alive
check_interval 1
check_period 24x7
contact_groups netcool
notification_interval 1
notification_options d,u
}

####################################################################
# cat services.cfg

define service{
name generic-service
service_description generic-service
is_volatile 0
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_interval 0
notification_period 24x7
notification_options w,c,r
notifications_enabled 0
contact_groups Supervisors
register 0
}

define service{
name Ping-LAN
service_description ping
use generic-service
check_command check_centreon_ping!3!200,20%!400,50%
register 0
;TEMPLATE-HOST-LINK generic-host
}

define service{
host_name srv-xen03.mydomain.com
service_description ping
use Ping-LAN
}

define service{
host_name srv-xen02.mydomain.com
service_description ping
use Ping-LAN
}

define service{
host_name srv-xen04.mydomain.com
service_description ping
use Ping-LAN
}

define service{
host_name srv-xen05.mydomain.com
service_description ping
use Ping-LAN
}

define service{
host_name SLW-E11.mydomain.com
service_description ping
use Ping-LAN
}

James Pifer
2009-06-04 18:36:13 UTC
Permalink
Post by James Pifer
Hi,
/etc/nagios/hosts.cfg
/usr/local/centreon/filesGeneration/nagiosCFG/1/hosts.cfg
neither of them contains the host I created...
I grepped all of the cfg files and none of them contain it...
It seems that you did not generate & restart your configuration from
the main Centreon server ?
Configuration > Nagios > Nagios
Do you select the correct poller on the form ?
Do you have any debug/informations when you run it from Centreon ?
Alright, now the information is getting to nagios. I had the hosts added
and enabled in centreon, but they were enabled in a host group. When I
applied to nagios, the hosts seem to be there in the config file, but
still not showing up in the gui.

Close now!

Thanks,
James

# cat /etc/nagios/hosts.cfg
###################################################################
# #
# GENERATED BY CENTREON #
# #
# Developped by : #
# - Julien Mathis #
# - Romain Le Merlus #
# #
# www.centreon.com #
# For information : ***@centreon.com #
###################################################################
# #
# Last modification June 4, 2009, 12:34 pm #
# #
###################################################################

define host{
name generic-host
alias generic-host
check_command check_host_alive
max_check_attempts 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
contact_groups Supervisors
notification_interval 0
notification_period 24x7
notification_options d,r
notifications_enabled 0
register 0
}

define host{
name Printers
use generic-host
alias Printers
register 0
}

define host{
name Router-Cisco
use generic-host
alias Cisco Routers
register 0
}

define host{
name Router-HP
use generic-host
alias HP Routers
register 0
}

define host{
name Servers-Linux
use generic-host
alias Linux Servers
register 0
}

define host{
name Servers-Win2K
use generic-host
alias Windows 2000 Servers
register 0
}

define host{
name Servers-Win2K3
use generic-host
alias Windows 2003 Servers
register 0
}

define host{
name Switchs-3Com
use generic-host
alias 3Com Switchs
register 0
}

define host{
name Switchs-Cisco
use generic-host
alias Cisco Switchs
register 0
}

define host{
name Switchs-HP
use generic-host
alias HP Switchs
register 0
}

define host{
name Switchs-NORTEL
use generic-host
alias NORTEL Switchs
register 0
}

define host{
name UPS
use generic-host
alias UPS
register 0
}

define host{
host_name Centreon-Server
use Servers-Linux
alias Monitoring Server
address 127.0.0.1
hostgroups Linux_Servers
}

define host{
host_name xen02.pca.com
use Servers-Linux
alias pcalakxen02
address 10.96.4.152
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 0
passive_checks_enabled 0
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}

define host{
host_name xen03.pca.com
use Servers-Linux
alias pcalakxen03
address 10.96.4.153
hostgroups Linux_Servers
check_command check_host_alive
max_check_attempts 10
check_interval 1
active_checks_enabled 0
passive_checks_enabled 0
check_period 24x7
obsess_over_host 0
check_freshness 0
flap_detection_enabled 0
process_perf_data 0
retain_status_information 0
retain_nonstatus_information 0
notification_interval 1
notification_period 24x7
notification_options d,u
notifications_enabled 1
}
Loading...