Question

extraction of information from probes

  • 19 January 2023
  • 2 replies
  • 74 views

Badge +1

Hi , during my intership my boss ask me for having a way to extrac information from our probes. By information i mean a list of all my prob who have a note or a link attached to her.

do you know a way to extract this from centreon and if so in which format?

I started work on centreon like 2 weeks ago so i Don't know a lot of things about this tool

 

thank.


2 replies

Userlevel 5
Badge +14

I think you want to use “clapi” command line

and get the attributes of the “services” and “services template” using the getparam action :

Command Line API (v1) - CLAPI | Centreon Documentation

Command Line API (v1) - CLAPI | Centreon Documentation

but you will need to query each service and service template individually, you may want to code a bash to help you there

 

the most simple way is to dump the whole config with clapi

Command Line API (v1) - CLAPI | Centreon Documentation

all the output are in csv, you could then use excel to get all the params that concern note and comment and link

(be aware that if a setting is set on a service template, you won’t see it on the indivual service, you need to be aware of template inheritance)

 

 

maybe the best way to get what you want is the Rest API v2

Centreon Web RestAPI

you query all the ressource and there should be these fields in the json output

  • action_url
  • notes_label
  • notes_url

 

but you need to know how to use postman or equivalent, or know how to code request for RestApi (python, powershell, other)

Badge +1

Thank u for your answer i’m going to try that ASAP. thank you

 

Reply