summaryrefslogtreecommitdiffstats
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2016-11-19Allow negation of command line arguments using '--no'-prefixrefs/pull/13/headManfred Stock1-1/+17
Getopt::Long supports negatable boolean options by appending an '!' to the option specification, so this allows to use this functionality with Monitoring::Plugin::Getopt as well.
2016-04-02Fixed regex in plugin_exit() that handles hyphen for LONGOUTPUT.refs/pull/11/headPaul Dugas1-1/+14
Added tests.
2015-03-30Revert "fix warning in function tests"Sven Nierlein1-1/+1
This reverts commit 5b2ab7f928b17b2013bdc914e36f7c2314f7b922.
2015-03-30fix warning in function testsSven Nierlein1-1/+1
fixes https://rt.cpan.org/Ticket/Display.html?id=103190 Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-12-28Merge pull request #2 from evgeni/getopt_colon_specSven Nierlein1-1/+29
GetOpt::Long optional arguments using a colon instead of an equal sign
2014-12-28fix test in windowsSven Nierlein1-1/+4
on windows backslashes are expected instead of forward slashes. fixes https://rt.cpan.org/Ticket/Display.html?id=100708 Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-10-03format optional arguments in square braketsrefs/pull/2/headEvgeni Golov1-4/+4
2014-10-03GetOpt::Long optional arguments using a colon instead of an equal signEvgeni Golov1-1/+29
Instead of writing `foo|f=s` you can also write `foo|f:s` for a GetOpt::Long option spec [1], thus making the argument optional. The current implementation of `_spec_to_help` will wrongly render this as two long options: --dirport, --d:9030 directory port instead of a short and a long one: -d, --dirport=INTEGER directory port This commit fixes the the parsing of the spec, detection of the type and adds tests for a few common cases this could be used in. [1] http://perldoc.perl.org/Getopt/Long.html#Summary-of-Option-Specifications
2014-01-20keep the old name in copyright for more transparencyv0.37Sven Nierlein1-13/+13
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2014-01-19renamed module into Monitoring::PluginSven Nierlein23-584/+564
since the complete monitoring team has been renamed, we also rename this module. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2012-06-29Add new test - match on "die" error messageThomas Guyot-Sionnest3-1/+4
1. Add new test "class" where expected data is the error string caught 2. Add new test exposing a bug where default file used is not shown, ex: Invalid section 'bad_section' in config file ''
2011-12-22check_threshold to check multiple values at onceTon Voon1-1/+7
2010-12-03Fixed test failure with Test::More 0.96 (RT57709)nagios1-2/+3
2010-04-15Test for exported variable %STATUS_TEXT (Andrew Ford - RT46048)tonvoon1-0/+16
2010-03-12shortname enhancementThomas Guyot-Sionnest1-1/+7
This patch makes shortname use the defined plugin's name if set, otherwise the normal method should prevail. To do so I had to generate shortname during np initialization instead of at use time.
2009-06-06Fixed parsing when two = signs within the performance data portiontonvoon@users.sourceforge.net1-1/+5
2009-03-03Added parsing of labels with spaces (thanks to Kang)Ton Voon2-8/+113
2009-01-05Check for valid numerical value before returning perfdata objectTon Voon1-1/+7
2008-12-13One other test, from check_ntp_timeTon Voon1-1/+12
2008-12-13Fixed parsing of numeric values with commas instead of periods. Fixed test planTon Voon1-5/+50
for CPAN test failures of 0.29. Change to parse_perfstring to return back successfully parsed fields, rather than an empty field, when errors seen
2008-12-02Added clean_label, like rrdlabel, but without truncationTon Voon1-7/+9
2008-11-21Fixed test problems against Test::More 0.86Ton Voon1-2/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@2089 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Get rid if CVS/SVN tags (this is an example anyway)Thomas Guyot-Sionnest1-4/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@2083 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Add max_state_* interface warper to Nagios::Plugin objectThomas Guyot-Sionnest1-0/+21
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@2082 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-14Fixed parsing of scientific notationTon Voon1-4/+23
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1993 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-27Missing section test was failing because of thisThomas Guyot-Sionnest1-0/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1964 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-17Fixed parsing of negative values and support full range definitionsTon Voon1-1/+30
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1952 f882894a-f735-0410-b71e-b25c423dba1c
2008-02-01Fixed a test where a fractional number was stripped outTon Voon1-2/+7
of the hash key, causing test failures git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1921 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-18Use $^X for perl because of failures on CPAN TestersTon Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1878 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-13Added testcase for > 2 repeated parametersTon Voon3-0/+7
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1868 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-24Help, usage and version output go to stdout now, rather than stderrTon Voon4-17/+16
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1795 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-04Fixed CPAN test failures due to bad MANIFEST. Fixed version numberingTon Voon1-1/+10
Fixed a performance parsing problem where uom=% wasn't being recognised git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1775 f882894a-f735-0410-b71e-b25c423dba1c
2007-08-31Convenience function to set use_die on use of N::P::PerformanceTon Voon1-0/+13
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1773 f882894a-f735-0410-b71e-b25c423dba1c
2007-08-31Fixed bug where warn or crit = 0 will raise an error. Optional flag toTon Voon2-2/+19
tell nagios_die to use die instead of exit so trappable by eval git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1772 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-21Finished initial --extra-opts support; added Getopt spec-to-help and ↵Gavin Carr32-30/+150
multiline help support. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1643 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-16Cleanups, mostly to N::P::Range/Threshold/Performance.Gavin Carr2-14/+60
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1641 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-14Refactor N::P::Performance; cleanups to Threshold and Range (mostly perldocs).Gavin Carr2-5/+45
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1640 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-08Fixed warnings when no uom specified for add_perfdataTon Voon2-1/+11
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1618 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-08Add initial --default-opts implementation to Nagios::Plugin::Getopt (II).Gavin Carr21-0/+151
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1617 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-07Added max_state functionTon Voon1-0/+21
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1615 f882894a-f735-0410-b71e-b25c423dba1c
2006-12-18Add t/Nagios-Plugin-04.t, which tests top level Getopt and Threshold methodsNathan Vonnahme1-0/+91
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1550 f882894a-f735-0410-b71e-b25c423dba1c
2006-11-17* renamed N::P::arg to add_argNathan Vonnahme2-19/+26
* some POD work git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1539 f882894a-f735-0410-b71e-b25c423dba1c
2006-11-15made 'usage' unmandatory in N::P::new().Nathan Vonnahme3-18/+18
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1538 f882894a-f735-0410-b71e-b25c423dba1c
2006-11-11Add get_shortname to NP::Functions export_ok list; update perldocs.Gavin Carr1-1/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1537 f882894a-f735-0410-b71e-b25c423dba1c
2006-11-10* exposed Getopt and Threshold functionality from top level Nagios::PluginNathan Vonnahme5-76/+53
* exchanged Class::Struct for Class::Accessor * POD is not updated yet. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1536 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-04Fix NP shortname defaulting; downgrade version requirements.Gavin Carr2-2/+16
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1489 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-26Add additional Nagios::Plugin tests.Gavin Carr3-0/+411
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1484 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-26Update Nagios::Plugin with NP::Function wrapper methods, and extras.Gavin Carr1-1/+17
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1483 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-26Rename NP::Base to NP::Functions; add check_messages() to NP::Functions.Gavin Carr6-19/+186
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1482 f882894a-f735-0410-b71e-b25c423dba1c
2006-09-25Fix Nagios::Plugin->new( shortname => "ANYTHING" ); (Wolfgang Barth)Ton Voon1-1/+8
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1481 f882894a-f735-0410-b71e-b25c423dba1c