View Full Version : Upload Nagis configuration - Service problem
Lap
18th August 2005, 15:09
Hi,
I've just installed Oreon--1.2.2-RC3 on a RHel3 and everything went well. Then i tried to import my configuration's files from Nagios but it seems to have a problem with service.cfg If Oreon knows all the hosts, contacts... it didn't get any service...
I have checked the tar.gz file to verify if it contains the service.cfg and it does.
In the Oreon's FAQ I found that SELinux could makes problems on a Fedora Core 3. Knowing anything about SELinux, I asked google and I tried some SELinux'commands (setenforce=0...) et checked if its files exist without any success. So I presume that the problem is somewhere else...
Does anyone got the same problem or an idea?
rom
18th August 2005, 15:31
Hi, it's in this RC that we release the import of nagios conf. Maybe you should send me your service.cfg file or just the part you think it can make a trouble.
Lap
18th August 2005, 15:42
Well, I have no doubt on the file as it works well with Nagios. I have just a problem to make Oreon to take act of it.
PS: Julio m'aide déjà en francais alors je ne vais pas mobiliser toutes vos équipes. J'ai mis ce post pour le compléter par la suite pour nos amis anglophones. :wink:
julio
18th August 2005, 15:43
yes but may be we have a bug. Rom can verifying it... like you want
Lap
18th August 2005, 15:55
Well here is all the services for one of my host. All the services are build on the same model:
# Service definition
define service{
use generic-service ; Name of service template to use
host_name NETFILTER
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups supervision_systeme
notification_interval 60
notification_period 24x7
notification_options c,r
# check_command check_icmp
check_command check_ping!1000.0,20%!5000.0,60%
}
# Service definition
define service{
use generic-service ; Name of service template to use
host_name NETFILTER
service_description + Charge: 1/5/15 min.
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups supervision_systeme
notification_interval 60
notification_period 24x7
notification_options c,r
# check_command check_icmp
check_command check_snmp!power!.1.3.6.1.4.1.2021.10.1.3.1,.1.3.6 .1.4.1.2021.10.1.3.2,.1.3.6.1.4.1.2021.10.1.3.3 -w 10,5,2 -c 12,7,4 -l load
}
# Service definition
define service{
use generic-service ; Name of service template to use
host_name NETFILTER
service_description + RAM: Dispo/Totale
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups supervision_systeme
notification_interval 60
notification_period 24x7
notification_options c,r
# check_command check_icmp
check_command check_snmp!power!.1.3.6.1.4.1.2021.4.6.0,.1.3.6.1. 4.1.2021.4.5.0 -w 65536: -c 1024:
}
# Service definition
define service{
use generic-service ; Name of service template to use
host_name NETFILTER
service_description + Utilisation CPU
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups supervision_systeme
notification_interval 60
notification_period 24x7
notification_options c,r
# check_command check_icmp
check_command check_snmp!power!.1.3.6.1.4.1.2021.11.9.0,.1.3.6.1 .4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'user/system/idle:' -u '%'
}
rom
18th August 2005, 16:27
In class/NagiosConfigClass.class.php, line 217 replace :
preg_match("/[ \t]*([\w\-]+)[ \t]+([\|\(\)\>\<\?\!\{\}\$-_\/+:\.@\"\'\d\w\s]+)/", $str, $regs);
by
preg_match("/^[ \t]*([\w\-]+)[ \t]+([\|\(\)\>\<\?\!\{\}\$-_\/+:\.@\"\'\d\w\s]+)/", $str, $regs);
Ans try again, in the current version I don't think to manage comment line IN definition.
Lap
18th August 2005, 16:42
What are you talking about?
What for is this modification?
I have look in class/ and tis file doesn't exist... I have :
Nagioscfg.class.php
But this file doesn't contain "preg_match" and line 217 is completely different...
rom
18th August 2005, 16:47
Sorry, it's NagiosConfigFile.class.php
Lap
18th August 2005, 16:57
Ok! But don't make a change... :cry: