Centreon

IT & Network Monitoring.

Case Management · Centreon

Details

IDCentreon
ProviderCentreon
CategoryCase Management
From Version5.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Supported ModulesAgentix XSIAM

README

Overview

Use Centreon to check the status of hosts and services.

This integration was integrated and tested with Centreon v2.8.20.

NOTE: Cortex XSOAR only works for Centreon v2.8.14 and later.


Use Cases

  • Check the status of hosts.
  • Check the status of services.

Configure Centreon on Cortex XSOAR

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for Centreon.
  3. Click Add instance to create and configure a new integration instance.
    • Name: a textual name for the integration instance
    • Server URL (http://147.75.33.100:20016/)
    • Username
    • Do not validate server certificate (not secure)
  4. Click Test to validate the URLs and connection.

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.


Get host status: centreon-get-host-status

Command Example

!centreon-get-host-status viewType=all fields=id,name limit=10

Inputs

Parameter Description
viewType

Predefined filter (like in the monitoring view).

  • all
  • unhandled
  • problems
fields

List of fields that you want to get. Fields are separated from each other with a comma.

For example: fields=id,name,alias,address.

status

Status of the host you want to get.

  • up
  • down
  • unreachable
  • pending
  • all
hostgroup

Hostgroup ID filter.

For example: hostgroup=2.

instance

Instance ID filter.

For example: instance=2.

search

Search pattern applied on host name.

For example: search="localhost".

criticality A specific criticality.
sortType

Sorting method.

  • Ascending: asc
  • Descending: desc
limit Number of lines that you want.
number Page number.

 

Context Output

Path Description
Centreon.Host.Output Host output
Centreon.Host.Name Host name
Centreon.Host.State Host state
Centreon.Host.Address Host address
Centreon.Host.Id Host ID


Raw Output

{  
    "Host":[  
               {  
               "Acknowledged":"0",
               "Address":"127.0.0.1",
               "Alias":"Localhost",
               "CheckAttempt":"1",
               "Criticality":"",
               "Id":"17",
               "InstanceName":"Central",
               "LastCheck":"1524487617",
               "LastHardStateChange":"",
               "LastStateChange":"",
               "MaxCheckAttempts":"3",
               "Name":"Localhost",
               "Output":"OK - 127.0.0.1: rta 0.076ms, lost 0%",
               "State":"0",
              "StateType":"1"
      },
               {  
               "Acknowledged":"0",
               "Address":"192.168.1.22",
               "Alias":"jumphost",
               "CheckAttempt":"1",
               "Criticality":"",
               "Id":"37",
               "InstanceName":"Central",
               "LastCheck":"1524487822",
               "LastHardStateChange":"1523986444",
               "LastStateChange":"1523986444",
               "MaxCheckAttempts":"3",
               "Name":"jumphost",
               "Output":"OK - 192.168.1.22: rta 0.379ms, lost 0%",
               "State":"0",
               "StateType":"1"
      },
               {  
               "Acknowledged":"0",
               "Address":"192.168.1.22",
               "Alias":"jumphost",
               "CheckAttempt":"1",
               "Criticality":"",
               "Id":"38",
               "InstanceName":"Central",
               "LastCheck":"1524487722",
               "LastHardStateChange":"1523987517",
               "LastStateChange":"1523987517",
               "MaxCheckAttempts":"3",
               "Name":"jumphost_1",
               "Output":"OK - 192.168.1.22: rta 0.389ms, lost 0%",
               "State":"0",
               "StateType":"1"
      }
   ]
}

Get service status: centreon-get-service-status

Command Example

!centreon-get-service-status status=ok fields=id,host_id limit=5 sortType=asc

Inputs

Parameter Description
viewType

Predefined filter (like in the monitoring view).

  • all
  • unhandled
  • problems
fields

The list of fields that you want to get, each field separated by a comma.

For example: fields=id,name,alias,address.

status

Status of the host you want to get.

  • ok
  • warning
  • critical
  • unknown
  • pending
  • all
hostgroup

Hostgroup ID filter.

For example: hostgroup=2.

servicegroup Servicegroup ID filter.
instance

Instance ID filter.

For example: instance=2.

search Search pattern applied on service.
searchHost Search pattern applied on host.
searchOutput Search pattern applied on output.
criticality A specific criticality.
sortType

Sorting method.

  • Ascending: asc
  • Descending: desc
limit Number of lines that you want.
number Page number.

 

Context Output

Path Description
Centreon.Service.Output Service output
Centreon.Service.Name Service name
Centreon.Service.State Service state
Centreon.Service.Description Service description
Centreon.Service.Id Service ID

 

Raw Output

{
  "Service": [
    {
      "Acknowledged": "0",
      "CheckAttempt": "1",
      "Criticality": "",
      "Description": "Ping",
      "HostId": "37",
      "LastCheck": "1524487467",
      "LastHardStateChange": "1523986444",
      "LastStateChange": "1523986444",
      "MaxCheckAttempts": "3",
      "Name": "jumphost",
      "Output": "OK - 192.168.1.22: rta 0.185ms, lost 0%",
      "Perfdata": "rta=0.185ms;200.000;400.000;0; pl=0%;20;50;; rtmax=0.398ms;;;; rtmin=0.106ms;;;;",
      "ServiceId": "132",
      "State": "0",
      "StateType": "1"
    },
    {
      "Acknowledged": "0",
      "CheckAttempt": "1",
      "Criticality": "",
      "Description": "Ping",
      "HostId": "38",
      "LastCheck": "1524487617",
      "LastHardStateChange": "1523987517",
      "LastStateChange": "1523987517",
      "MaxCheckAttempts": "3",
      "Name": "jumphost_1",
      "Output": "OK - 192.168.1.22: rta 0.235ms, lost 0%",
      "Perfdata": "rta=0.235ms;200.000;400.000;0; pl=0%;20;50;; rtmax=0.514ms;;;; rtmin=0.134ms;;;;",
      "ServiceId": "133",
      "State": "0",
      "StateType": "1"
    }
  ]
}

Configuration parameters

  • server — Server URL (e.g. http://147.75.33.100:20016/) (required)
  • credentials — Username (required)
  • insecure — Trust any certificate (not secure)
  • proxy — Use system proxy settings

Commands (2)

  • centreon-get-host-status

    All the monitoring information regarding hosts.

  • centreon-get-service-status

    All the monitoring information regarding services.

commonfields:
  id: Centreon
  version: -1
name: Centreon
display: Centreon
category: Case Management
provider: Centreon
description: IT & Network Monitoring.
configuration:
- display: Server URL (e.g. http://147.75.33.100:20016/)
  name: server
  defaultvalue: ""
  type: 0
  required: true
- display: Username
  name: credentials
  defaultvalue: ""
  type: 9
  required: true
- display: Trust any certificate (not secure)
  name: insecure
  type: 8
  required: false
- display: Use system proxy settings
  name: proxy
  type: 8
  required: false
script:
  script: ''
  type: python
  subtype: python3
  commands:
  - name: centreon-get-host-status
    arguments:
    - name: viewType
      auto: PREDEFINED
      predefined:
      - all
      - unhandled
      - problems
      description: 'select the predefined filter like in the monitoring view: all, unhandled, problems.'
    - name: fields
      description: 'the fields list that you want to get separated by a ”,”. For example: fields=id,name,alias,address.'
    - name: status
      auto: PREDEFINED
      predefined:
      - up
      - down
      - unreachable
      - pending
      - all
      description: the status of hosts that you want to get (up, down, unreachable, pending, all).
    - name: hostgroup
      description: hostgroup id filter. For example, hostgroup=2.
    - name: instance
      description: instance id filter. For example, instance=2.
    - name: search
      description: search pattern applied on host name. For example, search="localhost".
    - name: criticality
      description: a specific criticality.
    - name: sortType
      auto: PREDEFINED
      predefined:
      - asc
      - desc
      description: asc,desc.
    - name: limit
      description: number of lines that you want.
    - name: number
      description: page number.
    outputs:
    - contextPath: Centreon.Host.Output
      description: Host output.
      type: string
    - contextPath: Centreon.Host.Name
      description: Host name.
      type: string
    - contextPath: Centreon.Host.State
      description: Host state.
    - contextPath: Centreon.Host.Address
      description: Host address.
      type: string
    - contextPath: Centreon.Host.Id
      description: Host id.
      type: number
    description: 'All the monitoring information regarding hosts.'
  - name: centreon-get-service-status
    arguments:
    - name: viewType
      auto: PREDEFINED
      predefined:
      - all
      - unhandled
      - problems
      description: 'select the predefined filter like in the monitoring view: all, unhandled, problems.'
    - name: fields
      description: the fields list that you want to get separated by ",". For example, fields=id,description,host_id.
    - name: status
      auto: PREDEFINED
      predefined:
      - ok
      - warning
      - critical
      - unknown
      - pending
      - all
      description: the status of services that you want to get (ok, warning, critical, unknown, pending, all).
    - name: hostgroup
      description: hostgroup id filter. For example, hostgroup=2.
    - name: servicegroup
      description: servicegroup id filter.
    - name: instance
      description: instance id filter. For example, instance=2.
    - name: search
      description: search pattern applied on service.
    - name: searchHost
      description: search pattern applied on host.
    - name: searchOutput
      description: search pattern applied on output.
    - name: criticality
      description: a specific criticality.
    - name: sortType
      auto: PREDEFINED
      predefined:
      - asc
      - desc
      description: asc or desc.
    - name: limit
      description: the amount of lines that you want.
    - name: number
      description: page number.
    outputs:
    - contextPath: Centreon.Service.Output
      description: Service output.
      type: string
    - contextPath: Centreon.Service.Name
      description: Service name.
      type: string
    - contextPath: Centreon.Service.ServiceId
      description: Service id.
      type: number
    - contextPath: Centreon.Service.Description
      description: Service description.
      type: string
    - contextPath: Centreon.Service.State
      description: Service state.
    description: All the monitoring information regarding services.
  runonce: false
  dockerimage: demisto/python3:3.12.13.10116658
tests:
- Centreon-Test-Playbook
fromversion: 5.0.0