I need a monitoring tool for freebsd reddit / freebsd ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 14:24 i need to monitor stats like cpu/io/memory/network both on node level as well as per process, the best i was able to find till now is python-psutil, but thats in python, i am looking for a inbuild solution or anything in Golang, Rust or bash. i was able to gather metrics for cpu and memory using a messy bash script(ps and top command), but IO and n/w i am not able to do. i am looking for a proper library or utility, i found many libraries in Go, but freebsd support is not so good in most of them. i need to parse the metrics for prometheus to consume Thanks in advance Edit:Thanks everyone for response, as [**himay81**](https://www.reddit.com/user/himay81/) mentioned netdata seems to be promising for my use case, will update as i explore more ---------------------------------------------------------------------- [deleted] · 2021-12-27 14:57 htop is a better top ---------------------------------------------------------------------- gmelis · 2021-12-27 15:16 If by any chance your file system is ZFS, for disk I/O I suggest the command \`zpool iostat 10\`, where \`10\` is the secs between updates. \`systat\`, I believe, is the goto command in FreeBSd for statistics, though. ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 15:17 I couldn't find disk IO in htop, also I will need to parse the output of htop which I am trying to avoid ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 15:48 zpool iostat deesnt seem to return process level, same for systat, also i will need to parse the outputs in bash, which i amtrying to avoid ---------------------------------------------------------------------- gmelis · 2021-12-27 16:02 Could you provide an example of what you're searching for? ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 16:03 Golang process metrics but cpu, io are missing for freebsd https://github.com/shirou/gopsutil ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 16:04 this works but i will need to install python just for instrumentation https://pypi.org/project/psutil/ ---------------------------------------------------------------------- itsmeadityaagarwal · 2021-12-27 16:08 i need to parse the metrics for prometheus to consume ---------------------------------------------------------------------- edthesmokebeard · 2021-12-27 16:11 htop - for Fisher-Price sysadmins ---------------------------------------------------------------------- gmelis · 2021-12-27 16:23 I see. Nope, I don't know of an easy fix. On the other hand I have python on all my machines, virtual of not. ---------------------------------------------------------------------- [deleted] · 2021-12-27 16:26 Lol. I use it, gives me an idea what's going on with system resources and I do find it a bit more useful then top and it works in a terminal window. It's not for everything. If your doing some serious fine tuning you need better info. ---------------------------------------------------------------------- il-est-la · 2021-12-27 16:29 I had the same need a while ago and ended up using the grafana agent. It pushes metrics (prometheus format) to a remote host. It works really well. ---------------------------------------------------------------------- hulleyrob · 2021-12-27 16:43 Have you taken a look at bpytop, its a python top program that is pretty good and more graphical than htop. ---------------------------------------------------------------------- CoolTheCold · 2021-12-27 21:45 Take a look on collectd. Afair it had prometheus exports options as well. More scalable choice: ditch Freebsd and have access for better tooling as most of modern tools are Linux first (I.e. exporting services metrics right from systemd/cgroups level) ---------------------------------------------------------------------- Naglafar · 2021-12-27 23:25 Net data ? ---------------------------------------------------------------------- tux2bsd · 2021-12-27 23:58 It literally makes no sense that you would capitalise nearly everything except 'i' (and FreeBSD). ---------------------------------------------------------------------- CoolTheCold · 2021-12-28 05:12 https://github.com/strofimovsky/collectd-plugin-zfs But I haven't tried it myself ---------------------------------------------------------------------- himay81 · 2021-12-28 06:06 [Telegraf](https://github.com/influxdata/telegraf) and [Netdata](https://github.com/netdata/netdata) both are pretty mature on FreeBSD and extensively use Go for metrics collection. Might be worth looking into how they're used there. Or just [output Telegraf data directly to Prometheus](https://docs.inf luxdata.com/telegraf/v1.14/data_formats/output/prometheus/). More direct [tutorial here](https://blog.nobugware.com/post/2016/telegraf_p rometheus_metrics_swiss_army_knife/). ---------------------------------------------------------------------- girt-by-sea · 2021-12-28 06:27 I'm not at my desk right now, but from memory vmstat has most of what you want. ---------------------------------------------------------------------- lispstudent · 2021-12-28 09:25 I found [atop](https://www.freshports.org/sysutils/atop/) and [ztop](https://www.freshports.org/sysutils/ztop/) useful. I keep them in a tmux session all the time. ---------------------------------------------------------------------- grahamperrin · 2021-12-30 20:59 Yeah, [net-mgmt/netdata](https://www.freshports.org/net-mgmt/netdata/) although I have no idea whether it fits the prometheus context. me making use of it. ---------------------------------------------------------------------- himay81 · 2021-12-31 04:45 netdata does explain how to connect up to Prometheus as a backend: [ht tps://learn.netdata.cloud/docs/agent/backends/prometheus/](https://lea rn.netdata.cloud/docs/agent/backends/prometheus/) ---------------------------------------------------------------------- grahamperrin · 2022-01-01 07:52 NB, in the opening post: >>> prometheus ---------------------------------------------------------------------- CoolTheCold · 2022-01-01 09:42 Would be nice if you share back your final solution to let others know what works fine ---------------------------------------------------------------------- itsmeadityaagarwal · 2022-01-01 18:22 trying to have a single tool for everything ---------------------------------------------------------------------- itsmeadityaagarwal · 2022-01-01 19:40 Thanks man, u saved me days of headache, this seems promising, although just by reading the name i assumed it is only for network stats, my bad ---------------------------------------------------------------------- itsmeadityaagarwal · 2022-01-01 19:49 Updated ---------------------------------------------------------------------- grahamperrin · 2022-01-09 07:45 > ZFS FreeBSD bug [260966 – [NEW PORT] sysutils/zfs_exporter: Prometheus exporter for ZFS](https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260966)