Hi,
I would like to know how to change the status of a service using the command line in my Centreon server.
Thanks.
Hi,
I would like to know how to change the status of a service using the command line in my Centreon server.
Thanks.
Best answer by ruben_mendez
Hey, I finally made it, I used the socket centreon:
timestamp = int(datetime.datetime.now().timestamp())
commandfile = '/var/lib/centreon-engine/rw/centengine.cmd'
subprocess.run(['/bin/bash', '-c', f"echo \"[{timestamp}] PROCESS_SERVICE_CHECK_RESULT;10.0.2.249;backup_status;{status_centreon[0]};{status_centreon[1]}\" > {commandfile}"])But there is a problem. I only can use it with Centreon v.22.04.4 it works, but with v.23.10.9 it doesn’t work. Where I need to create a ticket about this problem?
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.