Question

Ping Error Central-centreon while exporting configuration

  • 3 July 2023
  • 7 replies
  • 462 views

Badge +2

Hello everyone,

I’m having a problem that I understand, but all I’m doing to fix that don’t work. My problem is that I was trying to export configuration on web centreon and I have such an error : 

engine : log started
Reading main configuration file '/var/cache/centreon/config/engine/1/centengine.DEBUG'.
Reading resource file '/var/cache/centreon/config/engine/1/resource.cfg'

“Error while processing a config file: Configuration parsing failed in file '/var/cache/centreon/config/engine/1/services.cfg' on line 22604: Service 'Ping' has no check command (property 'check_command')
One or more problems occurred while processing the config files.
Check your configuration file(s) to ensure that they contain valid directives and data definitions.
If you are upgrading from a previous version of Centreon Engine, you should be aware that some variables/definitions may have been removed or modified in this version.
Make sure to read the documentation regarding the config files, as well as the version changelog to find out what has changed. “

 

As you can see the error is this one : Error while processing a config file: Configuration parsing failed in file '/var/cache/centreon/config/engine/1/services.cfg' on line 22604: Service 'Ping' has no check command (property 'check_command').

 

I had alreardy checked the Ping service of my central-centreon. My template is Base-Ping-LAN-custom.

It’s the first time that I have this error while exporting config and I don’t know what I did wrong.

 

Please help me !


7 replies

Badge +2

See how my Centreon-central is configured :

 

and here is what I get after exporting configuration :

 

Userlevel 5
Badge +11

Hello, 

Can you try to check the file /var/cache/centreon/config/engine/1/services.cfg  and go to the line indicated on the export debug? 

It seems the line number changed between your screenshot and your original post (l 22604 to 455)

I think you have multiple Ping services who doesn't have check command, so check this file to get the implicated service, put it a check command and retry an export 

 

Hope it helps

Userlevel 5
Badge +11

You can also check the service template you use (Base-Ping-LAN-custom) if it has a check_command, it will be more effective that way if you use this template on a lot of hosts

Userlevel 2
Badge +3

Hello, did you upgrade Centreon recently ? 

Also, are you sure those inputs are correct in the Warning/Critical fields ? 

Badge +2

Hello,

Thanks for answering.

I didn’t know that I had so many Ping that don’t have the right check_command. By checking the file I now see what’s the matter and try to fix it.

I just saw i another topic someone who has a similar problem as mine but on a specific Host (VPN), so I decided to use :

Template : generic-active-host

Check_command : base_host_alive

 

Do you think that it’s right to do so or not ?

 

 

Thanks !

Hello, 

Can you try to check the file /var/cache/centreon/config/engine/1/services.cfg  and go to the line indicated on the export debug? 

It seems the line number changed between your screenshot and your original post (l 22604 to 455)

I think you have multiple Ping services who doesn't have check command, so check this file to get the implicated service, put it a check command and retry an export 

 

Hope it helps

 

Badge +2

Hello, did you upgrade Centreon recently ? 

Also, are you sure those inputs are correct in the Warning/Critical fields ? 

Hello,

Yeah, I did it recently, so I assume that’s why I had so many Ping services that were not working.

Thank you !

Userlevel 5
Badge +11

Hello,

Thanks for answering.

I didn’t know that I had so many Ping that don’t have the right check_command. By checking the file I now see what’s the matter and try to fix it.

I just saw i another topic someone who has a similar problem as mine but on a specific Host (VPN), so I decided to use :

Template : generic-active-host

Check_command : base_host_alive

 

Do you think that it’s right to do so or not ?

 

 

Thanks !

 

Sure you can use this host template, but your problem seems to be related to the service template Base-Ping-LAN-custom, which is based on the service template Base-Ping-LAN 

Just make sure the Base-Ping-LAN template has a check command (don’t forget to check “Locked elements” to see it in the list), or add a command on Base-Ping-LAN-custom 
This template is the one who create “Ping” services, so if you add a command to it, all your Ping services should have a check_command too

 

 

Reply