connector-centreon-downtime-adapter

command
v0.0.0-...-9b5cd94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

README

connector-centreon-downtime-adapter

The adapter transforms legacy pbehavior events, which is generated by legacy connector-centreon-engine, to Canopsis API requests.

Event consuming

The adapter creates and listens legacy_pbehavior queue exhange=canopsis.events and routingKey=*.*.pbehavior.*.# and processes event_type=pbehavior events.

Examples:

  • create pbehavior event

    {
      "event_type": "pbehavior",
      "action": "create",
      "connector": "some-connector",
      "connector_name": "some-connector-name",
      "component": "some-component",
      "resource": "some-resource",
      "source_type": "resource",
      "downtime_id": 123,
      "pbehavior_name": "downtime",
      "entry": 1648119485,
      "timestamp": 1648119485,
      "start": 1648119485,
      "end": 1648119585
    }
    
  • delete pbehavior event

    {
      "event_type": "pbehavior",
      "action": "delete",
      "connector": "some-connector",
      "connector_name": "some-connector-name",
      "component": "some-component",
      "resource": "some-resource",
      "source_type": "resource",
      "downtime_id": 123,
      "pbehavior_name": "downtime",
      "entry": 1648119485,
      "timestamp": 1648119485
    }
    

Requirements

The adapter requires

  • Canopsis >= 4.6
  • RabbitMQ >= 3.7

Deployment

Use config.yml.example as a template and creates a configuration file. Provide the path to the config through -c argument.

Provide Canopsis API credentials through CPS_API_USERNAME and CPS_API_PASSWORD env vars.

Provide connection url to RabbitMQ through CPS_AMQP_URL env var.

Use -d to enable debug mode. Debug mode logs all HTTP exchanges with request and response bodies.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL