Adventure in automating centreon

Been a user of centreon for a few years.

https://www.centreon.com/

I use it to monitor my linux machines with snmp.

So figured I’d give this a shot to hopefully speed up and make future upgrades painless.

Goals:
Automate the iso deployment to VM (could probably cheat this by using the ova)
Automate the initial setup of templates and service checks.
Write scripts for adding clients.

Will likely start off using private gitlab server until i feel i have something of substance worth sharing.

1 Like

Past few days:

I have been working on a bash script to find the latest version and get the direct download URL for the OVA.

I was going to go for the ISO file, but deploying the OVA/OVF can be done directly with terraform…(although i haven’t committed to terraform yet, i am still researching ansible deployment with ansible too)

Also, I got the script working yesterday for getting the latest version direct download URL.

1 Like

Teaser of some progress…

Turned this section in their setup doc into some ansible code…

https://docs.centreon.com/21.10/en/installation/installation-of-a-central-server/using-virtual-machines.html#step-3--completing-the-configuration

1 Like

So made some good progress with deploying the OVA and initial configuration, but might be a bug i ran into…

I get to step 3.5.2 here

https://docs.centreon.com/21.10/en/installation/installation-of-a-central-server/using-virtual-machines.html#step-3--completing-the-configuration

and i run into an issue running the PHP script for partitioning.

It deployed and ALL but ONE of the default service checks is working.
Might be bug in version or issue with php partitioning script, in the OVA.

I reached out on the centreon slack to ask about it, but no one has responded in the last couple of days, so just going to work on different method… maybe come back to this one later. (i mean it is functional and other than securing user/db passwords from defaults and doing updates… its basically ready.

But going to look into this one next to see how it does.

https://download.centreon.com/#Packages

So I started using the iso for deployment of the the VM.

Which means the OS setup is manual, but I guess that will be fine.

Been working on ansible playbooks for the MySQL secure step, and other steps they want done for setup in the docs.

I might tackle setting up TLS next

Started working on the TLS setup using ansible today.

If they ever get around to updating the OVA so the mysql partitioning stuff works without issue, the process would be mostly hands off.

After i finish the TLS/cert setup stuff, then I’ll be able to move on to the API work for creating host & service templates.