An open API service indexing awesome lists of open source software.

https://github.com/leafney/disk-monitor-dingtalk

disk monitor 监控磁盘空间使用率并发送钉钉提醒
https://github.com/leafney/disk-monitor-dingtalk

dingtalk shell

Last synced: about 2 months ago
JSON representation

disk monitor 监控磁盘空间使用率并发送钉钉提醒

Awesome Lists containing this project

README

        

### disk-monitor

#### parameters

* `-t` -- `dingtalk_token`: **`Required`** dingtalk token
* `-p` -- `max_percent`: threshold percent,default `80`,between `0` to `100`
* `-h` -- `custom_host`: default get `hostname` or custom by yourself
* `-n` -- `send_when_normal`: Whether to send notify when disk space is normal,default `false`

#### how to use

```
$ chmod +x ./disk-monitor.sh
$ ./disk-monitor.sh -t

$ ./disk-monitor.sh -t -n
```

**Note**

The Ubuntu system may encounter errors `awk: line 2: function strtonum never defined`,Please install:
```
$ sudo apt-get install gawk
```

#### use with crontab

```
$ crontab -l
* * * * * /home/tiger/disk-monitor.sh -t > /dev/null 2>&1 &
```

#### demo

![](demo.png)

Article: [监控磁盘空间使用率并发送钉钉提醒 | IT范儿](https://www.itfanr.cc/2019/06/18/disk-monitor-send-dingtalk/)