-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
222 lines (153 loc) · 7.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
NAME
Zabbix::Check - System and service checks for Zabbix
VERSION
version 1.12
SYNOPSIS
System and service checks for Zabbix
UserParameter=cpan.zabbix.check.installed,/usr/bin/env bash -c "/usr/bin/env perl -MZabbix::Check 2>/dev/null; if [ \$? -eq 0 ]; then echo 1; else echo 0; fi"
UserParameter=cpan.zabbix.check.version,/usr/bin/env perl -MZabbix::Check -e_version
# Disk
UserParameter=cpan.zabbix.check.disk.discovery,/usr/bin/env perl -MZabbix::Check::Disk -e_discovery
UserParameter=cpan.zabbix.check.disk.bps[*],/usr/bin/env perl -MZabbix::Check::Disk -e_bps -- $1 $2
UserParameter=cpan.zabbix.check.disk.iops[*],/usr/bin/env perl -MZabbix::Check::Disk -e_iops -- $1 $2
UserParameter=cpan.zabbix.check.disk.ioutil[*],/usr/bin/env perl -MZabbix::Check::Disk -e_ioutil -- $1
# Supervisor
UserParameter=cpan.zabbix.check.supervisor.installed,/usr/bin/env perl -MZabbix::Check::Supervisor -e_installed
UserParameter=cpan.zabbix.check.supervisor.running,/usr/bin/env perl -MZabbix::Check::Supervisor -e_running
UserParameter=cpan.zabbix.check.supervisor.worker_discovery,/usr/bin/env perl -MZabbix::Check::Supervisor -e_worker_discovery
UserParameter=cpan.zabbix.check.supervisor.worker_status[*],/usr/bin/env perl -MZabbix::Check::Supervisor -e_worker_status -- $1
# RabbitMQ
UserParameter=cpan.zabbix.check.rabbitmq.installed,/usr/bin/env perl -MZabbix::Check::RabbitMQ -e_installed
UserParameter=cpan.zabbix.check.rabbitmq.running,/usr/bin/env perl -MZabbix::Check::RabbitMQ -e_running
UserParameter=cpan.zabbix.check.rabbitmq.vhost_discovery[*],/usr/bin/env perl -MZabbix::Check::RabbitMQ -e_vhost_discovery -- $1
UserParameter=cpan.zabbix.check.rabbitmq.queue_discovery[*],/usr/bin/env perl -MZabbix::Check::RabbitMQ -e_queue_discovery -- $1
UserParameter=cpan.zabbix.check.rabbitmq.queue_status[*],/usr/bin/env perl -MZabbix::Check::RabbitMQ -e_queue_status -- $1 $2 $3
# Systemd
UserParameter=cpan.zabbix.check.systemd.installed,/usr/bin/env perl -MZabbix::Check::Systemd -e_installed
UserParameter=cpan.zabbix.check.systemd.system_status,/usr/bin/env perl -MZabbix::Check::Systemd -e_system_status
UserParameter=cpan.zabbix.check.systemd.service_discovery[*],/usr/bin/env perl -MZabbix::Check::Systemd -e_service_discovery -- $1
UserParameter=cpan.zabbix.check.systemd.service_status[*],/usr/bin/env perl -MZabbix::Check::Systemd -e_service_status -- $1
# Time
UserParameter=cpan.zabbix.check.time.epoch,/usr/bin/env perl -MZabbix::Check::Time -e_epoch
UserParameter=cpan.zabbix.check.time.zone,/usr/bin/env perl -MZabbix::Check::Time -e_zone
UserParameter=cpan.zabbix.check.time.ntp_offset[*],/usr/bin/env perl -MZabbix::Check::Time -e_ntp_offset -- $1 $2
# Redis
UserParameter=cpan.zabbix.check.redis.installed,/usr/bin/env perl -MZabbix::Check::Redis -e_installed
UserParameter=cpan.zabbix.check.redis.discovery,/usr/bin/env perl -MZabbix::Check::Redis -e_discovery
UserParameter=cpan.zabbix.check.redis.running[*],/usr/bin/env perl -MZabbix::Check::Redis -e_running -- $1
UserParameter=cpan.zabbix.check.redis.info[*],/usr/bin/env perl -MZabbix::Check::Redis -e_info -- $1 $2
UserParameter=cpan.zabbix.check.redis.resptime[*],/usr/bin/env perl -MZabbix::Check::Redis -e_resptime -- $1
DISK
Zabbix check for disk
discovery
discovers disks
bps $1 $2
gets disk I/O traffic in bytes per second
$1: *device name, eg: sda, sdb1, dm-3, ...*
$2: *type: read|write|total*
iops $1 $2
gets disk I/O transaction speed in transactions per second
$1: *device name, eg: sda, sdb1, dm-3, ...*
$2: *type: read|write|total*
ioutil $1
gets disk I/O utilization in percentage
$1: *device name, eg: sda, sdb1, dm-3, ...*
SUPERVISOR
Zabbix check for Supervisor service
installed
checks Supervisor is installed: 0 | 1
running
checks Supervisor is installed and running: 0 | 1 | 2 = not installed
worker_discovery
discovers Supervisor workers
worker_status $1
gets Supervisor worker status: RUNNING | STOPPED | ...
$1: *worker name*
RABBITMQ
Zabbix check for RabbitMQ service
installed
checks RabbitMQ is installed: 0 | 1
running
checks RabbitMQ is installed and running: 0 | 1 | 2 = not installed
vhost_discovery $1
discovers RabbitMQ vhosts
$1: *cache expiry in seconds, by default 0*
queue_discovery $1
discovers RabbitMQ queues
$1: *cache expiry in seconds, by default 0*
queue_status $1 $2 $3
gets RabbitMQ queue status using queue discovery cache
$1: *vhost name*
$2: *queue name*
$3: *type: ready|unacked|total*
SYSTEMD
Zabbix check for Systemd services
installed
checks Systemd is installed: 0 | 1
system_status
gets Systemd system status: initializing | starting | running | degraded
| maintenance | stopping | offline | unknown
service_discovery
discovers Systemd enabled services
$1: *regex of service name, by default undefined*
service_status $1
gets Systemd enabled service status: active | inactive | failed |
unknown | ...
$1: *service name*
TIME
Zabbix check for system time
epoch
gets system time epoch in seconds
zone
gets system time zone, eg: +0200
ntp_offset $1 $2
gets system time difference by NTP server
$1: *server, by defaut pool.ntp.org*
$2: *port, by default 123*
REDIS
Zabbix check for Redis service
installed
checks Redis is installed: 0 | 1
discovery
discovers Redis instances
running $1
checks Redis is installed and instance is running: 0 | 1 | 2 = not
installed
$1: *bind, by defaut 127.0.0.1:6379*
info $1 $2
gets info
$1: *key*
$2: *bind, by defaut 127.0.0.1:6379*
resptime $1
gets single GET command response time from Redis
$1: *bind, by defaut 127.0.0.1:6379*
INSTALLATION
To install this module type the following
perl Makefile.PL
make
make test
make install
from CPAN
cpan -i Zabbix::Check
DEPENDENCIES
This module requires these other modules and libraries:
* JSON
* Net::NTP
* Lazy::Utils
REPOSITORY
GitHub <https://github.com/orkunkaraduman/Zabbix-Check>
CPAN <https://metacpan.org/release/Zabbix-Check>
AUTHOR
Orkun Karaduman (ORKUN) <orkun@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2017 Orkun Karaduman <orkunkaraduman@gmail.com>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.