Skip to main content
https://badge.fury.io/py/centreonapi.png https://travis-ci.com/guillaumewatteeux/centreon-sdk-python.svg?branch=master

Make a Python LIB for Centreon API

Forked from https://github.com/centreon/centreon-sdk-python

Install

$ pip install centreonapi

Usages

  • Connect to Centreon platform

from centreonapi.centreon import Webservice
centreon = centreon("https://centreon.mydomain.tld, "admin", "centreon")
  • List all hosts on Centreon platform

centreon.hosts.list()
>>>
{
  'Centeon-central': Centeon-central,
  'server1': myserver1
}
  • Add new host

centreon.hosts.add(
  name='server1',
  alias='DBServ',
  ip=127.0.0.1,
  template="DB-Host-Template",
  hg="DB Servers"
  )
  • Get host

_, myhost = centreon.hosts.get('server1')
myhost.name
>>>
server1
  • Macros

Get macros

_, macros = myhost.getmacro()
macros
>>>
{
  '$_HOSTMODULESTATSFILE$': $_HOSTMODULESTATSFILE$,
  '$_HOSTMYSQLPASSWORD$': $_HOSTMYSQLPASSWORD$,
  '$_HOSTMYSQLPORT$': $_HOSTMYSQLPORT$,
}

mymacro = macros.get('$_HOSTMYSQLPORT$')
mymacro.value
>>>
3306

Set Macros

myhost.setmacro('SECRETMACRO', 'pass', 1, 'secret macro pass')
  • HostTemplate on host

myhost.gettemplate()
>>>
{
  'App-Monitoring-Centreon-Central-custom': App-Monitoring-Centreon-Central-custom,
  'App-Monitoring-Centreon-Database-custom': App-Monitoring-Centreon-Database-custom,
  'App-Monitoring-Centreon-Poller-custom': App-Monitoring-Centreon-Poller-custom
}

Documentation

Complete documentation here

Features

  • TODO

Documentation

The full documentation is at http://centreonapi.rtfd.org.

History

0.1.5 (2019-02-16)

  • Beta version

0.1.0 (2018-12-14)

  • First release on PyPI.

Metadata

Release files for centreonapi 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for centreonapi 0.1.7
File Size Uploaded Provenance Actions
centreonapi-0.1.7.tar.gz 19.3 kB Without provenance Details for centreonapi-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for centreonapi 0.1.7
File Interpreter ABI Platform Actions
centreonapi-0.1.7-py2.py3-none-any.whl Python 3, Python 2 none any Details for centreonapi-0.1.7-py2.py3-none-any.whl

Total release size: 42.7 kB

Release files / centreonapi-0.1.7.tar.gz

Download URL centreonapi-0.1.7.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ece692881c17f805e3d374447620042abe8ada57cb4a3273c26e213aab14449e
BLAKE2b-256 checksum
How to use checksums
a9b9a06f778318390e7498af3d6acb53d51a2d24120b29599352e3d27c04cd26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

Release files / centreonapi-0.1.7-py2.py3-none-any.whl

Download URL centreonapi-0.1.7-py2.py3-none-any.whl
Size 23.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9ba46af73fac63ee5e1d8ec32b080f92d29583729f2896701b1161c1616e1274
BLAKE2b-256 checksum
How to use checksums
aad66fb362c8313d405e98c33788535a905d644495806643f56a7e480db05bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

Security for centreonapi 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page