Skip to main content
Needs Votes

Marking pollers with "Conf changed" after configuration changes on templates or groups

Related products:Infra Monitoring - Configuration
  • December 16, 2024
  • 9 replies
  • 66 views

Hi,

When configuration is changed using CLAPI it is not reflected which pollers are affected and you need to make a guess or reload the configuration on all pollers you have.

I find this behavior as gap in the internal Centreon logic. From operational and functional point of view there is no difference between configuration change done over web GUI, CLAPI or RestAPI. The way configuration is changed doesn’t matter. It should be followed by the same outcome – pollers for which configuration has changed should be marked with “Conf changed” flag.

That is more consistent and logical behavior.

9 replies

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • January 9, 2025

Hi ​@Jaroslaw Kesy which version of Centreon do you use?

In latest versions, we fixed APIv2 to insert change logs, so "Conf changed" column must reflect those changes.


Forum|alt.badge.img+7
  • Author
  • Steward **
  • 19 replies
  • January 10, 2025

Hi ​@Laurent,

we are using 24.04. withe the latest updates. My idea is not isolated to only the changes executed via APIv2 but a general one to any configuration change made using all available methods. 

I haven’t tested it with APIv2 yet in the version we have. But I did a lot of changes using CLAPI today again. CLAPI is still very useful method for mass changes which requires batch processing.

An example of a small part of such mass change batch (you can multiply it by 50): 

centreon -u admin -p <pass> -o HOST -a deltemplate -v 'al2n73001;NETWORK.FORTIGATE.SIDA.NODE'

centreon -u admin -p <pass> -o HOST -a applytpl -v 'al2n73001'

centreon -u admin -p <pass> -o HOST -a settemplate -v 'al2n73001;NETWORK.FORTIGATE.SIDA.SDWAN.NODE'

centreon -u admin -p <pass> -o HOST -a applytpl -v 'al2n73001'

centreon -u admin -p <pass> -o HOST -a addhostgroup -v 'al2n73001;network.view.fortigate.sida.sdwan'

centreon -u admin -p <pass> -o KPI -a ADD -v 'service;al2n73001|basic.icmp.ping;WAN_EMEA_AL2;;;'


Change logs are recorded but the corresponding pollers are not marked by the flag “Conf changed”:

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • January 10, 2025
NewDiscussion ongoing

lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • January 10, 2025

Hi ​@Jaroslaw Kesy , the current system doesn’t manage templates and groups, only direct objects linked to pollers (hosts and services) for performance issue.


rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • 1141 replies
  • January 10, 2025
Discussion ongoingNeeds Votes

Forum|alt.badge.img+7
  • Author
  • Steward **
  • 19 replies
  • January 10, 2025

Hi ​@Jaroslaw Kesy , the current system doesn’t manage templates and groups, only direct objects linked to pollers (hosts and services) for performance issue.

Hi ​@Laurent,

I don’t quite understand this statement.

The CLAPI commands I was using actually acted on HOST and SERVICE objects.
Here are 2 additional commands (I forgot to paste the last time) which update a specific macro for a selected service.
centreon -u admin -p <pass> -o SERVICE -a setmacro -v 'wrcn73x01;network.fortigate.traffic.internet;PORTFILTER;^port1$;0;'

centreon -u admin -p <pass> -o SERVICE -a setmacro -v 'wrcn73x01;network.fortigate.traffic.mpls;PORTFILTER;^port2$;0;'

 

Whenever you do such a change using web GUI you will see pollers marked with “conf changed” flag for which such configuration requires reload.

But in case of using these CLAPI commands it doesn’t happen.


Forum|alt.badge.img+7
  • Author
  • Steward **
  • 19 replies
  • January 14, 2025

Hi,

It looks like something happened in 23 releases:
CLAPI command like APPLYTPL not reflected in pollers GUI panel | Community 

 

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • January 15, 2025

Hi,

Yes we fixed configuration changes logs on APIv2 and for 24.x released.

CLAPI is old way and we will not fix it.

Regards


Forum|alt.badge.img+7
  • Author
  • Steward **
  • 19 replies
  • January 15, 2025

Hi,

Yes we fixed configuration changes logs on APIv2 and for 24.x released.

CLAPI is old way and we will not fix it.

Regards

Hi ​@Laurent ,


CLAPI may be called an “old way” but it is extremely useful and efficient when mass change updates are to be done.

 

IMHO API and CLAPI interfaces are designated to be used in 2 different categories of use cases:

  1. API - integration/automation use cases.
  2. CLAPI - mass change configuration updates.

I cannot imagine doing hundreds of config changes by using API. With CLAPI I was able to prepare CLAPI commands within half an hour with Excel and execute them within 10 minutes. With API it would take me significantly much more time.


From my experience CLAPI and API are equally important and should be treated the same way by Centreon team.

 

Regards.