Skip to main content

Hello,

 

the result of a curl command is the following (data have been modified).

curl -X GET -H "Accept: application/json" -H "Authorization: Bearer 1234" "https://toto.com"

>{"id":"abcd","name":"theName"}]

 

The plugin is executed.

/usr/lib/centreon/plugins//centreon_protocol_http.pl --plugin=apps::protocols::http::plugin --mode=json-content --hostname=toto.com --urlpath='/' --header='Authorization: Bearer 1234' --data='' --lookup='' --threshold-value='' --format-ok='' --format-warning='' --format-critical=''  --warning-numeric='' --critical-numeric='' --warning-string='' --critical-string='' --port='443' --proto='https' --filter-perfdata=''

OK:

My concern is how to use --lookup and --format-ok options to display ‘theName’.

Does some experience this kind of challenge ?

Have you looked into this?

 


Not for the moment, I’ll check if it can answer ; thanks for the proposal


I have some points with a json response, i parse it with jq.

Tutorial

 

 

 


Reply