monitoringartist / dockbix-agent-xxl

:whale: Dockerized Zabbix agent with Docker metrics and host metrics support for CoreOS, RHEL, CentOS, Ubuntu, Debian, Fedora, Boot2docker, Photon OS, Amazon Linux, ...
https://hub.docker.com/r/monitoringartist/dockbix-agent-xxl-limited/
Other
182 stars 54 forks source link

Cannot open memory.stat file and cannot get statistic #43

Closed marcolino7 closed 5 years ago

marcolino7 commented 5 years ago

Hi, I'm running dockerized version of dockbix-agent-xxl. Zabbix can discovery the items, but only items working is the one do not use memory.stat.

Docker info:

`Containers: 14 Running: 14 Paused: 0 Stopped: 0 Images: 63 Server Version: 17.12.0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 89623f28b87a6004d4b785663257362d1658a729 runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 4.9.0-8-amd64 Operating System: Debian GNU/Linux 9 (stretch) OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 1.91GiB Name: Docker2 ID: UAYJ:J33F:HHF3:2YQH:V5Y4:S2DH:Y4UX:7LJJ:DB7W:GWYL:G7SW:QORB Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

WARNING: No swap limit support `

OS: `PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

`

I enabled Debug Level of the agent at 5. Attached the log file, running for some minutes. docker.zip

Thanks

jangaraj commented 5 years ago

How did you start container?

20:20181018:104825.643 Metric source file: /rootfs/sys/fs/cgroup/memory/docker/1f837d5ec19b48ce8743623aa91b214783674d877be37afd8fa79db171ee0a83/memory.stat 20:20181018:104825.643 Looking metric total_swap in memory.stat file 20:20181018:104825.643 Sending back [ZBX_NOTSUPPORTED: Cannot find a line with requested metric in memory.stat file]

Probably you don't have enabled memory metrics, see https://github.com/monitoringartist/zabbix-docker-monitoring:

Note: if you have a problem with memory metrics, be sure that memory cgroup subsystem is enabled - kernel parameter: cgroup_enable=memory

marcolino7 commented 5 years ago

Hi @jangaraj , thanks for quick answer. I miss the note in Readme on how fix. Many Thanks

Marco