How can we Monitor or get aware packet loss using sensu plugin?

We have a situation. One of our server communicate with DB heavily. We want to be aware how many request which are not being responsed timely?

What mechanism can be adopt in context of Sensugo?

Hello!

A couple of options off the top of my head.

  1. If you are concerned about packet loss across the network
    common think to do is to run a ping_check against the host.
    and alert on package loss percentage. There are multiple implementations of this available as assets

  2. If you are concerned about a network problem on the database host, you could implement a check using netstat -i on the host running the service and alert on RX-ERR, RX-DRP, RX-OVR, TX-ERR, TX-DRP, TX-OVR. I’m not aware of an implementation right now, but should be easy to generate as a bash or perl script.

  3. If you are concerned about the database reach the limits of its operational capacity and refusing connections or timing you, you would implement a check against the database’s log looking for connection error log messages.

  4. create a check that acts as a synthetic test of your database and times a simple database query and returns non-zero status if the time to complete the query is too long to meet your requirements. This could be done as a simple bash script running the cmdline client for your database. This is probably what you really want, as it will capture performance problems that are not technically packet loss and will alert you that a performance issue is happening so you can try to diagnose what is going on.