Monitoring Docker containers

Hi All

I can see this topic has been mentioned in the past but I’m not sure anyone found an answer so I thought I’d try again :slight_smile:
I would like to be able to monitor stats from docker containers - mem usage, cpu and any services that stop etc.
I can monitor the host server quite happily usoing SNMP but I really need to see inside the containers as well.
Any ideas?

Hi,

would be great if someone with more experience in Docker could shed some light on this. Personally, coming from a vm backround, I didn’t dive into the specifics of how (dynamic) resource allocation, scheduling and balloning work with multiple running containers. I wonder if that falls within the realm of Kubernetes and if it would be better to gather that data from there instead or if there are much more suited monitoring and alerting tools for docker/kubernetes?

Anyhow - based on my extensive experience with VMs, I’ve learned that monitoring should be carried out both at the hypervisor and virtual machine level. I haven’t come across any effective approaches for monitoring a VM solely through the hypervisor. I saw quite a few attempts but the results were questionable and reminded me of the old saying, “Everything should be made as simple as possible, but not simpler.”

just my 5 cents here…

Hi,

I currently have also troubles to monitor docker containers.

What I have done yet:
Applications - LibreNMS Docs
Modify /etc/snmp/docker-stats.py → Set ONLY_RUNNING_CONTAINERS to False (otherwise, if a container is down it will not be monitored)

Create a rule with custom SQL querry:

SELECT * FROM devices,applications,application_metrics WHERE (devices.device_id = ? AND devices.device_id = applications.device_id AND applications.app_id = application_metrics.app_id) AND (application_metrics.metric = "total_paused" OR application_metrics.metric = "total_exited" OR application_metrics.metric = "total_dead") AND application_metrics.value > 0

Yet I can know if there is some dockers down on a docker server but not witch one.

Does anyone knows how to do so?

I tried to create an alerting template and use application.XXXX_YYY values but I can’t find witch one is giving the container name. I aim to have the container name in my alert message.

Kind regards

Hi,
No anwser to provide unfortunately but I believe we share the same type of issue.

LibreNMS sees my different containers but all are named under a specific way which I do not understand and cannot link to any logic or pattern.

Each time I stop/start a container, it appears down and once back on air LibreNMS will consider it as a new “port” under a new name.

How to provide LibreNMS the correct name or at least description ?

Cheers