Monitoring (multiple) nginx containers (on the same host)

Hi Robert,

Many thanks for the response.
I have created the config file:

cat /etc/check_mk/nginx_status.cfg
servers = [
{
“protocol” : “http”,
“address” : “localhost”,
“port” : 80,
},
{
“protocol” : “http”,
“address” : “172.18.0.4”,
“port” : 80,
“page” : “nginx_status”,
},
]

whereby the second entry is the container. With curl I can visit the nginx_status page:

curl http://172.18.0.4/nginx_status
Active connections: 6
server accepts handled requests
3371 3371 3837
Reading: 0 Writing: 6 Waiting: 0

Next to this I have the nginx_status plugin installed:

ls -al /usr/lib/check_mk_agent/plugins/nginx_status
-rwxr-xr-x 1 XXXXX XXXXX 3164 Jan 4 23:07 /usr/lib/check_mk_agent/plugins/nginx_status

However, when running the agent, this does not seem to provide the output:

/usr/bin/check_mk_agent | grep “<<<nginx_”
10:devices:/user.slice,8:blkio:/user.slice,7:pids:/user.slice/user-1002.slice/session-366.scope,6:cpu,cpuacct:/user.slice,4:memory:/user.slice/user-1002.slice/session-366.scope,1:name=systemd:/user.slice/user-1002.slice/session-366.scope,0::/user.slice/user-1002.slice/session-366.scope root 9232 2676 00:00:00 00:02 1269118 grep --color=auto <<<nginx_

I’m running the latest 2.0.0b3 version of CMK CRE, including the agent + plugins.

I have used this guide :

Am I still forgetting something?

Best regards,

Ron