Skip to main content

Hi all.

I start monitoring a docker node by using the docker plugin and I got this “error” message :

UNKNOWN: Node 'XXX.XXX.XXX.XXX': cannot decode json get containers response: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE HTML PUBLI...") at /usr/lib/centreon/plugins//centreon_docker_restapi.pl line 8744. - No container found.

And I saw that the port wasn’t specified in the perl command.

When I’m connect as centreon-engine and execute the command with good port , I got the good answer .

OK: Node 'XXX.XXX.XXX.XXX' Containers Running : 3, Containers Stopped : 0, Containers Paused : 0 | 'containers_running'=3;;;0; 'containers_stopped'=0;;;0; 'containers_paused'=0;;;0;

So I’m wondering where to change the port in the WebUI ?

I tryed this:

Is it in ``EXTRAOPTIONS`` or do I have to create a new entry ? 

Thx

OK:

I add --PORT=”2375” in `EXTRAOPTIONS` and I got this:

Unknown option: PORT at /usr/lib/centreon/plugins//centreon_docker_restapi.pl line 150.

So does it mean that I have to change the port in the perl script ?

Thx.


Funny !!

/usr/lib/centreon/plugins//centreon_docker_restapi.pl --plugin=cloud::docker::restapi::plugin --mode=container-usage --hostname='XXX.XXX.XXX.XXX' --port=''   --container-id='' --container-name='' --filter-name='' --warning-container-status='' --critical-container-status='' --warning-read-iops='' --critical-read-iops='' --warning-write-iops='' --critical-write-iops='' --warning-cpu='' --critical-cpu='' --warning-memory='' --critical-memory='' --warning-traffic-in='' --critical-traffic-in='' --warning-traffic-out='' --critical-traffic-out='' --verbose --PORT="2375"

I’m turning around , I have to change the port somewhere , but don’t really understand where…

 

 


Easy, just add --port=”2375” in “EXTRAOPTIONS”

That’s all .


Reply