forked from pynag/pynag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
445 lines (351 loc) · 16 KB
/
CHANGES
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
Changes in 1.1.1 (unreleased)
Bug Fixes:
- Fix recursive delete of host
- Multiple fixes for macro resolving
- Fix issues when finding command file fails
- Multiple fixes to daemon class and sudo
- Fix crash when archives directory contains directories
- Python 2.6 compatibility
- Fix comment_id being used instead of downtime_id in pynag.Model
New Features:
- New class: livestatus.LivestatusQuery
- New methods: Livestatus.write() and livestatus.raw_query()
- Livestatus now retries on socket errors
- New module Utils.state
- New module Parsers.main
Refactor:
- Perfdata moved to Utils.metrics
- GitRepo moved to Utils.git
- PynagError moved to pynag.errors
- send_nsca moved to Utils.nsca
- synchronized moved to Utils.decorators
- cache_only moved to Utils.decorators
- reconsile_threshold moved to Utils.metrics
- check_threshold moved to Plugins.classic_threshold_syntax
- check_range moved to Plugins.classic_threshold_syntax
- Livestatus moved to Parsers.livestatus
- Config moved to Parsers.config_parser
- SshConfig moved to Parsers.ssh_config
- StatusDat moved to Parsers.status_dat
- RetentionDat moved to Parsers.retention_dat
- ObjectCache moved to Parsers.object_cache
- ExtraOptsParser moved to Parsers.extra_opts
- LogFiles moved to Parsers.logs
Changes in 0.9.1 (August 5 2014)
Bug Fixes:
- Fixes file_time bug in Utils.CheckResult
Changes in 0.9.0 (July 23 2014)
New Features:
- new method: Model.*.rename()
- new class: Utils.CheckResult, add checkresults
http://docs.pynag.org/en/latest/pynag.Utils.html#pynag.Utils.CheckResult
- new importer module, currently supports csv files
http://docs.pynag.org/en/latest/pynag.Utils.html#module-pynag.Utils.importer
- better docstrings, reflected on http://docs.pynag.org
Bug Fixes:
- Bug fixes in Model.*.get_current_status()
- Fix Parsers.Livestatus.test() traceback
- Fix Parsers line continuation
- Fix contactgroup/service and contactgroup/host relationships
Changes in 0.8.9 (Apr 15 2014)
Bug Fixes:
- Deploy gzipped version of manpage with setup.py
Changes in 0.8.8 (Apr 15 2014)
Bug Fixes:
- MANIFEST fixes in the build process
New Features:
- Utils.misc.FakeNagiosEnvironment()
- Parsers.MultiSite now has backend aware get_host, get_contact, etc
- Incremental updates to unit tests
Changes in 0.8.7 (Apr 14 2014)
Bug Fixes:
- Ship a gzipped version of manpage with release
Changes in 0.8.6 (Apr 14 2014)
Bug Fixes:
- manpage is now delivered with the tarball (not generated on build itme)
- Docstring updates
New Features:
- Support for systemd init scripts
- New Module Parsers.MultiSite
- All classes in Parsers are now new-style
Changes in 0.8.5 (Apr 8 2014)
Bug Fixes:
- Fix broken build due to manpage requirements
Changes in 0.8.4 (Apr 8 2014)
New Features:
- get_effective_* is now faster
- New decorator Utils.cache_only()
- New method Service.merge_with_host()
Bug Fixes:
- Fix hostgroup/service relationships
Changes in 0.8.3 (Mar 24 2014)
New Features:
- Utils.runCommand() supports new env parameter
Bug Fixes:
- Parsers.LogFiles() now orders archivelogs by last modified time
Changes in 0.8.2 (Mar 21 2014)
New Features:
- Utils.AttributeList() - now aware of "null" values
- Notable performance tweaks in parsing
- Experimental Config Parser over ssh
- New EventHandler: NagiosReloadHandler
- Better shinken compatiblity
- New method: guess_nagios_binary()
- Major improvements in grep_to_livestatus
Bug Fixes:
- Code is more python3 compatible
- Performance tweaks in external commands
- Fixed Macro resolving for hosts
- Bugfixes in "Pynag livestatus" subcommand
Changes in 0.8.1 (Feb 19 2014)
New Features:
- Support setting of custom host variables
- Allow Model.*.acknowledge() with a timestamp
Bug Fixes:
- Better support for weird mk-livestatus configs
- Fix unintilized variables in pynag.Parsers.config
Changes in 0.8.0 (Jan 15 2014)
New Features:
- Auto guess config locations for icinga and naemon
- Performance improvements in Model
- send_nsca moved to pynag.Utils
- Model.filter() now uses Utils.grep() internally
- Utils.runCommand() now supports shell=False
Bug Fixes:
- fix host.delete() not deleting services
- Fixes for __in __notin and __contains in Utils.grep()
- Bug fixes in send_nsca
Changes in 0.7.0 (Oct 14 2013)
New Features:
- All plugins now have a --timeout=58 seconds
- New option to plugins: --extra-opts
- More thread safety in Model
- New method: ObjectDefinition.move() to move definition to a new file
- Plugins new threshold syntax can now fail back on the old syntax
Bug Fixes:
- python 2.4 compatibility in unittests
- Removed deprecated overload of Contact.get_description()
Changes in 0.6.1 (Aug 30 2013)
Bug Fixes:
- Disable unittesting on rhel5 (stops build because of unittest2)
Changes in 0.6.0 (Aug 28 2013)
New Features:
- Support line continuations with \ at end of line in config files
- Fix traceback in ParserError initilization
- Better error messages when invalid livestatus syntax has been used
- Utils.grep() new keywords __notstartswith and __notendswith
- Model.ObjectDefinition now supports "in" operator
- Multiple performance tweaks for parsing
- Plugins.PluginHelper.add_option() wrapper created
- Performance tweaks in Utils.grep()
- Thread-safety in Parsing/Saving methods in Model and Parser
- "in" operator implemented for Object Definitions
- delete() methods now more clever for {host,service,contact}s and groups
- Incremental performance updates on parsing
- New method: ObjectDefinition.attribute_is_empty()
- Massive refactor/rewrites in parsing logic
Bug Fixes:
- Fix traceback on search when searching for shortname in invalid configs
- pynag.Utils.GitRepo better handles file renames now
- pynag.Plugins.PluginHelper - no more crashing if parse_arguments was not called
- Fix parsing when multiple objects have conflicting names
- Support relative paths for cfg_dir and cfg_file
Changes in 0.5.0 (Jun 26 2013)
New Features:
- pynag cli - new action "unset" to remove attributes when updating
- PluginHelper - New option --pnp-compatible-perfdata
- TCP Support for mk-livestatus
- ObjectDefinitions now have new method: set_macro()
- Vast improvements to unit testing
- Fix unhandled tracebacks if invalid templates are defined
- Utils.GitRepo has new method: show()
- Vast performance improvement in parsing
- ObjectDefinition now iterable
- New Utility Class pynag.Utils.PluginOutput
- ObjectDefinition: magic fields like shortname are now part of keys()
- mk_livestatus new utility methods: get_servicegroups,hostgroups,etc
Noteworthy bug fixes:
- tracis-ci and coveralls.io support
- Macroresolving when ARG1 contains other macros
- get_suggested_filename() no longer returns filenames with invalid characters
- check_range(): Always return True on invalid range_format
- check_range(): raise exception on invalid input thresholds
Changes in 0.4.9 (Apr 30 2013)
New Features:
- pynag cli now has livestatus subcommand
- pynag cli multiple changes to make it more friendly to bash scripts
- --quiet option
- --seperator option
- pynag cli has acknowledge and downtime subcommands
- pynag.Model.*.delete() now are more context aware and remove references
from other objects
- More features in pynag.Utils.GitRepo
- Parser for retention.dat created
- pynag.utils.grep_to_livestatus() to convert from pynag style filters to
livestatus style filters
- add_to_contactgroup() created for pynag.Model.Services, Hosts, and
Contacts
- New functions pynag.Utils.grep(). Model filter() will use this in the
future.
- pynag.Model - object definitions now implement sort()
- pynag.Parsers.Logfiles added to parse nagios log files
Bugfixes:
- Multiple doctest and unittest fixes and improvements to code quality
- send_nsca - revert back to tabs instead of spaces
- Fix unhandled traceback with pynag copy
- Fix bug where directories with ending .cfg were parsed as files
- PluginHelper fixed in accordance to
http://nagiosplugins.org/rfc/new_threshold_syntax
Changes in 0.4.8 (Dec 10 2012)
New Features:
- MK Livestatus integration in pynag.Parsers.mk_livestatus
- Testing framework for plugins in scripts/plugintest
- Control.Command now uses livestatus if available.
- pynag.Plugins.PluginHelper() prototype
- Support for Nagios plugins new threshold format
Bugfixes:
- New Service() objects with no host_name are not saved in None/service_description anymore.
- GitEventHandler could not list files with spaces
- pynag.Plugins.simple.check_range was very broken, fixed and added testing framework
for pynag.Plugins
- Fix for correctly returning exit codes in Control.daemon()
- Static file parser now skips line not in format of key=value
- pynag.Parsers.status.get_hoststatus() and pynag.Parsers.status.get_servicestatus() should raise a ValueError rather than return it.
- timeperiod_name and alias were incorrectly saved
- Unhandled exception in contact.get_effective_services()
Changes in 0.4.7 (Oct 26 2012)
New Features:
- pynag cli: new parameter --debug
- pynag cli: new parameter --version
- Parsers.config.get_cfg_value() implemented
- Parsers.config.get_pid() implemented
- New Module: pynag.Control.Command for interactions with command_pipe
- Parsers.config.get_pid() implemented
Bugfixes:
- Discrepancy in CLI where filters between list and delete
- CLI now prints nice error message instead of stacktrace on errors
- ObjectFetcher.filter(): parameters ending in __isnot were always treated as an OR condition.
- "pynag execute" now works with services that define hostgroups instead of host_name
- Fixed macro resolving issues for services with hostgroups defined instead of host_name
- Fixed Default initilization of ObjectRelations.hostgroup_subgroups
- Bugfix: Nagios needs_reload() always returns false
- Bugfix: pynag.Parsers.config.needs_reload() always returns false
- Bugfix: Inverted conditions on pynag.Plugins.simple.check_range()
- Bugfix: Unhandled exception in pynag.Plugins.simple where must_thresholds=False
Changes in 0.4.6 (Sep 16 2012)
New Features:
- CLI Improvements
- manpage for pynag CLI updated
- New module Utils created
- Experimental new get_status() for ObjectDefinition
- Reworked GitEventHandler
- new function, Control.daemon.status()
- Experimental Perfdata analysis support
Bugfixes:
- Various bugfixes for get_effective_*groups()
- Various bugfixes in Parsers.config._edit_static_file()
- needs_reload() now compares timestamps with object_cache_file instead of lockfile
- Removed unneeded error handling from Control.daemon class
- Model filter, bugfix in __isnot= parameter
Changes in 0.4.5 (Aug 21 2012)
Bugfixes:
- popen2 import moved to send_nsca() to hide deprecationwarning
- pynag.Model no longer depends on defaultdict to work (for python 2.4)
- Removed dependency on defaultdict (does not exist on python 2.4)
- When permission problems occur for reading status.dat, exception is
now thrown in parse() rather than init()
- Version number is now correct
- debian subdir moved to debian.upstream for packaging
Changes in 0.4.4 (Aug 20 2012)
New Features:
- Host.copy(recursive=True) now recursively copies services
- README moved to markdown format ([email protected])
- Parsers.status class reworked. Now support get_servicestatus()
- filter() now supports __exists suffix for as a search condition
- Major rework og object relations and object cache ([email protected])
Bugfixes:
- get_all_macros returns empty hash map on non-existant check_command
- New get_effective_* functions i.e. Host.get_effective_contacts()
- ObjectDefinition.get_id() changed from md5sum to built-in __hash__()
- Fixes to get_effective_command_line() where macro within another macro was
not properly solved. ([email protected])
- GitEventHandler changed to use subprocess module instead of GitPython
- Support for nagios's ambigious Timeperiod format.
- check_thresholds() added (Issue 22) ([email protected])
- check_range() conditions now inverted (Fixes issue 22)
- /usr/local/nagios/etc/ added to paths where nagios.cfg might be found (Thanks
Abhinav Upadhyay)
- pycharm code inspection cleanup ([email protected])
Changes in 0.4.3 (Jul 13 2012)
Bugfixes:
- Model: Objectdefinition.delete() cascade parameter renamed to recursive.
Recursive implemented for host.
- Various fixes where nagios.cfg is not located in /etc/nagios/
- Improvements to build process
- Parsers: Exception handling loosened to not catch kill signals
- Model: calling filter() with __has_field now works on items seperated by ", "
Changes in 0.4.2
New features:
- new command-line tool pynag introduced (deprecated pynag-maincfg, etc).
pynag utility offers an easy way to create/update/delete configuration
objects from the command line. ([email protected])
- Model: ObjectDefinition.attributes are now defined according to
documentation, no longer dynamically created in order to ensure consistency
- Model: run_check_command() available for hosts and services
- Parsers: Working with comma seperated attribute values now easier
via new AttributeList class ([email protected])
- Model: copy() feature added to ObjectDefinitions.
Bugs fixed:
- Model, ObjectDefinition.copy() now returns a copy of the newly created object
- Parsers, Appending cfg_dir to nagios maincfg and pathnames dont match
exactly what is in config before (for example double slashes would cause a
duplicate)
- Parsers: Cache is no longer reloaded as often (improves performance)
- Parsers: Properly raise ParserError if unexpected '}' is encountered
while Parsing ([email protected])
- Parsers: ParserError class now has cleaner more detailed output
- Model: get_all_macros() now returns custom macros ([email protected])
- Fixed key errors where data is not present ([email protected])
- Parsers: improvements to reload_cache() to fix memory leak in save()
- Code cleanup ala Eclipse python analyser. Unused variables etc removed.
Changes in 0.4.1
Plugins
Fix to check_range which now support multiple status lines
Modifications for python-2.3 support
Scripts
Added pynag-maincfg which allows for editing nagios.cfg
Added pynag-addservice for easy addition of services
Model
Ability to set filename for new objects
save() now works on when changing 'use'
Modifications for python-2.3 support
Parsers
typo fixed in edit_service
Memory leak fix
Added servicedependency and hostdependency support
EventHandlers
Added GitEventHandler which automaticly commits to git
Changes in 0.4.0
Features added:
- Model, New module that turns configuration into python objects
- Parsers, major refactoring
Changes in 0.3.1
Bugs Fixed:
- Plugin, Fixed joinallstr, wasn't being added between severity levels.
Features added:
- Plugin, Add must_threshold variable for programs that do not need classic -w or -c
- Plugin, allow add_arg to be specified multiple times if multiple=True specified
- Plugin, removed space character between severity and colon, "OK:" instead of "OK :"
Changes in 0.3
Bugs Fixed:
Features added:
- Plugin add_messages() and check_messages()
- new build system for easier RPM creation
Misc Changes:
New Contributors:
Tomas Ewdardsson, Pall Sigurdsson