Skip to content

Commit 7c9cc49

Browse files
Add Additional Disk Space Check For /tmp on AIX hosts (#2795)
Co-authored-by: Scott Fryer <[email protected]>
1 parent 8a1f18a commit 7c9cc49

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

ansible/playbooks/nagios/README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ Based off the [installation guide](https://support.nagios.com/kb/article/nagios-
7070
And Off This [GitRepo](https://github.com/Willsparker/AnsibleBoilerPlates/tree/main/Nagios) :
7171
For some useful tips for working with vault files see [here](https://docs.ansible.com/ansible/latest/user_guide/vault.html)
7272

73+
### How to Add Additional Disk Space Check For /tmp on AIX hosts
74+
75+
* The commands configuration file `commands.cfg` can be located at
76+
77+
```bash
78+
/usr/local/nagios/etc/objects/commands.cfg
79+
7380
add_disk_space_check
7481
## How to add additional disk space check for /home/jenkins on AIX hosts.
7582

@@ -110,6 +117,45 @@ The second step above is repeated for all AIX hosts in the /usr/local/nagios/etc
110117
cd /usr/local/nagios/etc/objects
111118
```
112119

120+
* Open commands.cfg in a text editor
121+
122+
```bash
123+
nano commands.cfg
124+
```
125+
126+
* `check_tmp_disk` command definition
127+
128+
```bash
129+
define command{
130+
command_name check_tmp_disk
131+
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
132+
}
133+
134+
```
135+
* Point the machine to a specific configuration(`.cfg`) file where to spin from for the tmp disk check. These configuration files can be found in this directory
136+
137+
```bash
138+
/usr/local/nagios/etc/servers/example.cfg
139+
```
140+
141+
* Open example.cfg in a text editor
142+
143+
```bash
144+
nano example.cfg
145+
```
146+
147+
* The configuration file should look like this
148+
149+
```bash
150+
define service{
151+
use generic-service
152+
host_name machine host name goes here
153+
service_description Disk Space check for tmp
154+
check_command check_by_ssh!/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /tmp
155+
check_interval 40
156+
}
157+
```
158+
113159
* Open hostgroups.cfg in a text editor
114160

115161
```bash
@@ -164,4 +210,4 @@ define host {
164210
```bash
165211
/etc/init.d/nagios reload
166212
```
167-
master
213+

0 commit comments

Comments
 (0)