Haproxy status not working on web interface

Hello,

I’ve haproxy.py script configured on my VMs. It works good through command line
here is the output:
0 HAProxy_pxc-onenode-front/FRONTEND scur=0;250;500 OK - [status OPEN]
0 HAProxy_mysql-cluster/db01 scur=0;250;500|chkfail=6;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/db02 scur=0;250;500|chkfail=3;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/db03 scur=0;250;500|chkfail=6;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/BACKEND scur=0;250;500 OK - [status UP]

But result not exist on the web interface, only works through command line.

First check the agent output on your monitoring site.
You can do this with “cmk -d hostname” on the command line or inside the web interface with “download agent output”
image
Your output looks like a local check and should be visible inside the “<<>>” section.

Hello,

Thanks for your help.
Can you look at the attached file and image and let me know what is the cause of the problem.

Regards,


check_mk.txt (20.4 KB)

Hi @elkhedewy,

seems like, there is something wrong with your plugin, there is the section header for haproxy missing:

<<<apache_status>>>
10.151.158.71 81 Total Accesses: 26025
10.151.158.71 81 Total kBytes: 148116
10.151.158.71 81 CPULoad: .00164696
10.151.158.71 81 Uptime: 332735
10.151.158.71 81 ReqPerSec: .0782154
10.151.158.71 81 BytesPerSec: 455.831
10.151.158.71 81 BytesPerReq: 5827.89
10.151.158.71 81 BusyWorkers: 1
10.151.158.71 81 IdleWorkers: 5
10.151.158.71 81 Scoreboard: ____W_..........................................................................................................................................................................................................................................................
0 HAProxy_pxc-onenode-front/FRONTEND scur=0;250;500 OK - [status OPEN]
0 HAProxy_mysql-cluster/db01 scur=0;250;500|chkfail=6;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/db02 scur=0;250;500|chkfail=3;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/db03 scur=0;250;500|chkfail=6;15;25 OK - [status UP]
0 HAProxy_mysql-cluster/BACKEND scur=0;250;500 OK - [status UP]
<<<logins>>>

And beside this, you are using a damn old agent:

<<<check_mk>>>
Version: 1.4.0p33

Are you also running the same version as monitoring server or is it just the agent which is an old version?

Server version is [Checkmk 1.6.0p8]

seems like, there is something wrong with your plugin, there is the section header for haproxy missing:

i didn’t understand where exactly the problem.

Problem clear. The haproxy script is a local check. In your system it is in the wrong directory. Please move the script to the local folder and then it should work.

2 Likes

Hello Andreas,

For the first time i know about local directory. The script was in
/usr/lib/check_mk_agent/plugins

It worked now after moving it to
/usr/lib/check_mk_agent/local

But what is the difference between 2 folders?

Many thanks for your help ALL <3

1 Like

Local folder → local checks (scripts that already produce a valid check result)
Plugin folder → cmk plugins (scripts that produce raw data that must be processed on CMK side)

Local checks are the first step to write your own checks as you don’t need to produce code on the CMK server itself and it can be done in nearly all scripting language you know.

2 Likes

Many Thanks for you explanation

You should give your agent an update anyway.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.