You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above command definition there are two fixed arguments for the document root and the project name as well as one loose argument place holder that can hold all checks you want to run. The following shows one example service definition for one specific drupal site:
38
-
```bash
39
-
check command: ssh_drupal_cool-drupal-project
40
-
$ARG1$: /var/www/cool-drupal-project/drupal/
41
-
$ARG2$: Cool Drupal Project
42
-
$ARG3$: -s e -u w -e e -w w -m e
43
-
```
44
-
The above service defintion will check against security updates (with nagios error), against normal updates (with nagios warning), against core errors (with nagios error), against core warnings (with nagios warning) and finally against missed database updates (with nagios error).
45
29
46
-
## 2. Usage
30
+
## 1. Usage
47
31
48
-
### 2.1 `check_drupal`
32
+
### 1.1 `check_drupal`
49
33
50
-
**Note:** Currently the `-l` option is not yet implemented, but will so in a few days/weeks.
51
34
With `-l` you will be able to run the `check_drupal` locally on each machine only a few times a day and dump the output to a logfile.
52
35
This file can then be checked normaly via nagios by calling `check_drupal_log` instead, which will just read the log and not put any load onto the machine.
53
36
Multiple logfiles for multiple drupal site per server will be possible.
@@ -112,26 +95,37 @@ For each check you can specify the nagios severity (error or warning).
112
95
--version Show version information.
113
96
```
114
97
115
-
### 2.2 `check_drupal_log`
98
+
### 1.2 `check_drupal_log`
99
+
100
+
```bash
101
+
Usage: check_drupal_log -f <logfile>
102
+
OR check_drupal_log --help
103
+
OR check_drupal_log --version
104
+
105
+
Nagios plugin that will parse the logfile created by 'check_drupal'.
116
106
117
-
To be implemented (1-2 weeks)
107
+
-f <logfile> The full path to logfile created by 'check_drupal'
118
108
109
+
--help Show this help
110
+
--version Show version information.
111
+
```
119
112
120
-
## 3. Examples
113
+
## 2. Examples
121
114
122
115
The following examples are run directly from the command line. The exit code will always be aggregated, meaning if the program throws a warning and an error, the final exit code will result in an error.
123
116
124
117
Also to note: The first line until the `|` represents the actual nagios output. Everything in the first line behind the `|` is performance data used to generate the cool charts. Everything from line two onwards is nagios extended status info (when you click on details).
125
118
126
-
### 3.1 Check for security updates
119
+
**Check for security updates**
127
120
```bash
128
121
./check_drupal -d /shared/httpd/sites-drupal/COOL-PROJECT/drupal/ -n COOL-PROJECT -s e
129
122
[ERROR] COOL-PROJECT has errors: Security update(s) |'OK'=0;;;0;1 'Errors'=1;1;1;0;1 'Warnings'=0;1;;0;1 'Unknown'=0;;;0;1
130
123
==== SECURITY UPDATES ====
131
124
[CRITICAL] drupal 7.40 -> 7.41
132
125
[CRITICAL] jquery_update 7.x-2.6 -> 7.x-2.7
133
126
```
134
-
### 3.2 Check for security and normal updates
127
+
128
+
**Check for security and normal updates**
135
129
```bash
136
130
./check_drupal -d /shared/httpd/sites-drupal/COOL-PROJECT/drupal/ -n COOL-PROJECT -s e -u w
In the above command definition there are two fixed arguments for the document root and the project name as well as one loose argument place holder that can hold all checks you want to run. The following shows one example service definition for one specific drupal site:
183
+
```bash
184
+
check command: ssh_drupal_cool-drupal-project
185
+
$ARG1$: /var/www/cool-drupal-project/drupal/
186
+
$ARG2$: Cool Drupal Project
187
+
$ARG3$: -s e -u w -e e -w w -m e
188
+
```
189
+
The above service defintion will check against security updates (with nagios error), against normal updates (with nagios warning), against core errors (with nagios error), against core warnings (with nagios warning) and finally against missed database updates (with nagios error).
190
+
191
+
### 3.2 check_drupal_log
192
+
193
+
#### Command definition
194
+
In order to check drupal sites on remote servers you will need to make use of `check_by_ssh`.
0 commit comments