-
Notifications
You must be signed in to change notification settings - Fork 29
/
man.1
323 lines (311 loc) · 5.26 KB
/
man.1
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ZABBIXCTL" "1" "February 2019" "" ""
.
.SH "NAME"
\fBzabbixctl\fR \- tool for working with zabbix using command line interface
.
.SH "DESCRIPTIOPN"
\fIzabbixctl\fR is tool for working with zabbix server api using command line interface, it provides effective way for operating on statuses of triggers, hosts latest data and groups of users\.
.
.SH "CONFIGURATION"
\fIzabbixctl\fR must be configurated before using, configuration file should be placed in \fB~/\.config/zabbixctl\.conf\fR and must be written using following syntax:
.
.IP "" 4
.
.nf
[server]
address = "zabbix\.local"
username = "admin"
password = "password"
[session]
path = "~/\.cache/zabbixctl\.session"
.
.fi
.
.IP "" 0
.
.P
\fIzabbixctl\fR will authorize in \'zabbix\.local\' server using given user credentials and save a zabbix session to a file \fB~/\.cache/zabbixctl\.session\fR and at second run will use saved session instead of new authorization, by the way zabbix sessions have a ttl that by default equals to 15 minutes, so if saved zabbix session is outdated, \fIzabbixctl\fR will repeat authorization and rewrite the session file\.
.
.SH "SYNOPSIS"
.
.nf
zabbixctl [options] \-T [/<pattern>\.\.\.]
zabbixctl [options] \-L <hostname>\.\.\. [/<pattern>\.\.\.]
zabbixctl [options] \-G [/<pattern>\.\.\.]
zabbixctl \-h | \-\-help
zabbixctl \-\-version
.
.fi
.
.SH "OPTIONS"
\fB\-T \-\-triggers\fR
.
.P
Search on zabbix triggers statuses\. Triggers could be filtered using /\fIpattern\fR argument, for example, search and acknowledge all triggers in a problem state and match the word \'cache\':
.
.P
\fBzabbixctl \-Tp /cache\fR
.
.P
\fB\-y \-\-only\-nack\fR
.
.P
Show only not acknowledged triggers\.
.
.P
\fB\-x \-\-severity\fR
.
.P
Specify minimum trigger severity\. Once for information, twice for warning, three for disaster, four for high, five for disaster\.
.
.P
\fB\-p \-\-problem\fR
.
.P
Show triggers that have a problem state\.
.
.P
\fB\-r \-\-recent\fR
.
.P
Show triggers that have recently been in a problem state\.
.
.P
\fB\-s \-\-since \fIdate\fR\fR
.
.P
Show triggers that have changed their state after the given time, default: 7 days ago\.
.
.P
\fB\-u \-\-until \fIdate\fR\fR
.
.P
Show triggers that have changed their state before the given time\.
.
.P
\fB\-m \-\-maintenance\fR
.
.P
Show hosts in maintenance\.
.
.P
\fB\-i \-\-sort \fIfields\fR\fR
.
.P
Show triggers sorted by specified fields, default: lastchange,priority\.
.
.P
\fB\-o \-\-order \fIorder\fR\fR
.
.P
Show triggers in specified order, default: DESC\.
.
.P
\fB\-n \-\-limit \fIamount\fR\fR
.
.P
Show specified amount of triggers\.
.
.P
\fB\-k \-\-acknowledge\fR
.
.P
Acknowledge all retrieved triggers\.
.
.P
\fB\-f \-\-noconfirm\fR
.
.P
Do not prompt acknowledge confirmation dialog\.
.
.P
\fB\-L \-\-latest\-data\fR
.
.P
Search and show latest data for specified host(s)\. Hosts can be searched using wildcard character \'*\'\. Latest data can be filtered using /\fIpattern\fR argument, for example retrieve latest data for database nodes and search information about replication:
.
.P
\fBzabbixctl \-L dbnode\-* /replication\fR
.
.P
\fB\-g \-\-graph\fR
.
.P
Show links on graph pages\.
.
.P
\fB\-G \-\-groups\fR
.
.P
Search and operate on configuration of users groups\.
.
.P
\fB\-l \-\-list\fR
.
.P
Show list users in specified users group\.
.
.P
\fB\-a \-\-add\fR
.
.P
Add specified \fIuser\fR to specified users group\.
.
.P
\fB\-r \-\-remove\fR
.
.P
Remove specified \fIuser\fR from speicifed users group\.
.
.P
\fB\-f \-\-noconfirm\fR
.
.P
Do not prompt confirmation dialog\.
.
.SH "COMMON OPTIONS"
\fB\-c \-\-config \fIpath\fR\fR
.
.P
Use specified configuration file, default: \fB$HOME/\.config/zabbixctl\.conf\fR
.
.P
\fB\-v \-\-verbosity\fR
.
.P
Specify program output verbosity\. Once for debug, twice for trace\.
.
.P
\fB\-h \-\-help\fR
.
.P
Show this screen\.
.
.P
\fB\-\-version\fR
.
.P
Show version\.
.
.SH "EXAMPLES"
\fIListing triggers in a problem state\fR
.
.IP "" 4
.
.nf
zabbixctl \-Tp
.
.fi
.
.IP "" 0
.
.P
\fIListing triggers that have recenty been in a problem state\fR
.
.IP "" 4
.
.nf
zabbixctl \-Tr
.
.fi
.
.IP "" 0
.
.P
\fIListing and filtering triggers that contain a word mysql\fR
.
.IP "" 4
.
.nf
zabbixctl \-T /mysql
.
.fi
.
.IP "" 0
.
.P
\fIListing and acknowledging triggers that severity level is DISASTER\fR
.
.IP "" 4
.
.nf
zabbixctl \-T \-xxxxx \-k
.
.fi
.
.IP "" 0
.
.P
\fIListing latest data for db nodes and filtering for information about replication lag\fR
.
.IP "" 4
.
.nf
zabbixctl \-L dbnode* /lag
.
.fi
.
.IP "" 0
.
.P
\fIOpening stacked graph for CPU quote use of selected containers\fR
.
.IP "" 4
.
.nf
zabbixctl \-L \'container\-*\' /cpu quota \-\-stacked
.
.fi
.
.IP "" 0
.
.P
\fIListing users groups that starts with \'HTTP_\'\fR
.
.IP "" 4
.
.nf
zabbixctl \-G HTTP_*
.
.fi
.
.IP "" 0
.
.P
\fIListing users groups that contain user admin\fR
.
.IP "" 4
.
.nf
zabbixctl \-G /admin
.
.fi
.
.IP "" 0
.
.P
\fIAdding user admin to groups that contain user guest\fR
.
.IP "" 4
.
.nf
zabbixctl \-G /guest \-a admin
.
.fi
.
.IP "" 0
.
.SH "AUTHOR"
Egor Kovetskiy \fIe\.kovetskiy@gmail\.com\fR
.
.SH "CONTRIBUTORS"
Stanislav Seletskiy \fIs\.seletskiy@gmail\.com\fR
.
.P
Andrey Kitsul \fIa\.kitsul@zarplata\.ru\fR
.
.P
GitHub \fIhttps://github\.com/kovetskiy/zabbixctl\fR