Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

centreonapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

centreonapi

Centreon Api for use Webservice in Centreon Web 2.8.0 or later

  • 0.1.7
  • PyPI
  • Socket score

Maintainers
1

============================= Centreon SDK Python

.. image:: https://badge.fury.io/py/centreonapi.png :target: http://badge.fury.io/py/centreonapi

.. image:: https://travis-ci.com/guillaumewatteeux/centreon-sdk-python.svg?branch=master :target: https://travis-ci.org/guillaumewatteeux/centreon-sdk-python

Make a Python LIB for Centreon API

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

Install

.. code-block:: shell

$ pip install centreonapi

Usages

  • Connect to Centreon platform

.. code-block:: python

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

.. code-block:: python

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

.. code-block:: python

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

.. code-block:: python

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

Get macros

.. code-block:: python

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

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

Set Macros

.. code-block:: python

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

.. code-block:: python

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_

.. _here: https://centreonapi.readthedocs.io/

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc