4 ms·
That's one thing I don't need to do. If the disk gets to 80%, I get an email from the monitoring system. 90% and I get a text.
by Symbiote 9y ago
That's one thing I don't need to do. If the disk gets to 80%, I get an email from the monitoring system. 90% and I get a text.
- letientai299 9y agoCould you please share how did you setup to be able to get such notification?
- vk23 9y agoHave a look at nagios. It's a popular open source server/application monitoring tool. You can define custom alerts and monitor basicly everything.
- FuckOffNeemo 9y agoNot OP, but we use Nagios XI for such alerting, it provides SMS and email monitoring for infrastructure (disk space as an example) and service monitoring. [1] Their open source NCPA (Nagios Cross Platform agent) plugin for Windows and Linux hosts is pretty great, though we were stung when we found out it didn't natively support SPARC as of yet unless you compiled your own client from the source (I did). [2] Plenty of other monitoring services equivalent to Nagios offer equivalent services. Nagios was just the flavour I suggested to my current employer because of my familiarity with the product over my last few employments. If you don't want to fork out the licensing for the supported version (XI), their open source version is free and relatively easy to deploy using Ansible if you don't mind writing in PHP. [3] Edit: words, grammar. [1] https://www.nagios.com/products/nagios-xi/ https://www.nagios.com/products/nagios-xi/ [2] https://github.com/NagiosEnterprises/ncpa https://github.com/NagiosEnterprises/ncpa [3] https://hobo.house/2016/06/24/automate-nagios-deployment-with-ansible/ https://hobo.house/2016/06/24/automate-nagios-deployment-wit...
- more-coffee 9y agoI will give a simplified example of the only product I've used for this: Zabbix. Disclaimer: I'm not a sysadmin but a developer, who happened to work somewhere they used Zabbix for monitoring all kinds of network devices, databases, services, etc. Perhaps there are better solutions available, I welcome any discussion on that. Deploying Zabbix roughly consists of setting up one (or more) Zabbix Master servers, and installing a 'zabbix-agent' process on each device you want to monitor. The agent process extracts a variety of statistics about the system and makes them available to the Monitoring server, either in push ("active") or pull ("passive") fashion. The Master logs all of these statistics over time. You can then define 'Triggers' that apply logical tests to statistics, such as "in the last 5 minutes, was the free diskspace < 10GB". When this happens, it triggers an event. Then elsewhere you have defined your Notification rules that act upon generated events, to send out an email or text message. https://www.zabbix.com/features#notification https://www.zabbix.com/features#notification This was obviously really simplified, and there is so much more you can do, but I hope this at least gave you a basic picture.
- navinsylvester 9y agoIt's very straight forward to setup. I have used Prometheus for the same and so far the experience has been much better compared to Zabbix. # node_exporter on the client to get metrics # prometheus on server to pull the metrics from node_exporter # alertmanager for raising alerts # grafana on top of it for pretty graphs(optional)
- softawre 9y agoOutside of nagios, you can also use pricier but arguably more fully featured setups like New Relic + PagerDuty.
- mdekkers 9y agoHave a look at netdata: https://github.com/firehol/netdata https://github.com/firehol/netdata
- jiri 9y agoAnecdocte: our sysadmin set similar thing up (at 90%) at one of my boxes. but conflicting configuration of debian os also reserved 15% of capacity for OS, so system became completely unresponsive at 85% full disk, without emailing message about free space - 85% was for our purpose effectively 100% full disk. Still dont know what lesson I should learn from this story.
- more-coffee 9y agoReserved capacity as in `sudo tune2fs <volume> | grep Reserved block count`? Those should already be excluded from available diskspace, so that is kind of interesting.
- jiri 9y agoI am not sure how he was getting free space for email warning, but in final state, running df showed plenty of space on disk, although writing to files signals "no disk space" error.
- db48x 9y agoReserved capacity is reserved for use by root, so when a process running as root runs df (or any similar command or syscall), then it sees that capacity as available. Kinda useless these days, but was very useful back when you might have server daemons and a bunch of normal users with shell accounts on the same machine.
- teddyh 9y agoHuh? I have never seen that behavior, and I can’t reproduce it as described. Did it ever work that way? Do you have any reference for this?
- db48x 9y agoWell, there's man tune2fs: -m reserved-blocks-percentage Set the percentage of the filesystem which may only be allocated by privileged processes. Reserving some number of filesystem blocks for use by privi‐ leged processes is done to avoid filesystem fragmentation, and to allow system daemons, such as syslogd(8), to continue to function correctly after non- privileged processes are prevented from writing to the filesystem. Normally, the default percentage of reserved blocks is 5%. -g group Set the group which can use the reserved filesystem blocks. The group parameter can be a numerical gid or a group name. If a group name is given, it is converted to a numerical gid before it is stored in the superblock.