summaryrefslogtreecommitdiffstats
path: root/plugins/check_snmp.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-31check_snmp: Fix regression introduced in #1867716Thomas Guyot-Sionnest1-2/+10
Bug #1867716 fixed what it meant to fix: broken perfdata strings. Unfortunately some users relied on half-broken perfdata string where at least the first token was OK. This patch do a two-way conversion (string to double then back to string) instead and use the conversion result for the performance data. A possible caveat is that the string may change where it normally shouldn't but the result should be somewhat similar.
2009-10-22Fix usage of repeated -o options in check_snmpThomas Guyot-Sionnest1-1/+1
2009-08-05Fix segfault in check_snmp (definitive fix is still in the works - see bug ↵Thomas Guyot-Sionnest1-3/+5
#2832451)
2009-08-01Fix check_snmp passing single-quotes as -m argument when it should be emptyThomas Guyot-Sionnest1-3/+3
2009-07-31check_snmp: Add some verbose output and testsThomas Guyot-Sionnest1-2/+5
2009-05-28check_snmp: Make use of standard threshold functionsThomas Guyot-Sionnest1-197/+53
This patch makes use of standard threshold functions. This allows using doubles as thresholds. Since SNMP supports only integers, double precision numbers are only printed when parsed from a STRING type. In addition, support for printing properly Timeticks type has been added, and the code has been thoroughly cleaned.
2009-05-27Fix whitespaces in check_snmpThomas Guyot-Sionnest1-73/+73
2009-03-18check_snmp: Fix potential buffer overflow - enforce MAX_OIDS limit (John A. ↵Thomas Guyot-Sionnest1-2/+1
Barbuto)
2009-03-16check_snmp fixes:Thomas Guyot-Sionnest1-5/+5
- Fix broken compilation caused by typo in command ending - Remove extra whitespaces at EOL - Fix invalid host test on Ubuntu Hardy (and possibly others)
2009-03-14Ignore stderr messages unless return code is non-zero or there is no outputTon Voon1-12/+20
2009-03-14Fixed passing of quotes in OID for check_snmp (#1985230 - Jan Wagner, patch ↵Ton Voon1-155/+140
by John Barbuto)
2009-02-24check_snmp long help missing retries entry (#2608223)Thomas Guyot-Sionnest1-0/+2
Fix for check_snmp long help, reported by Richard Edward Horner
2009-02-20Typo fixes (Jan Wagner - SF 1878971)Ton Voon1-3/+3
2008-12-23Allow privproto to be passed through check_snmp to snmpget. Defaults to DESTon Voon1-4/+13
for compatibility
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-6/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupThomas Guyot-Sionnest1-19/+19
$ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-09check_snmp now only prints perfdata for non numeric values (Joerg Linge ↵Matthias Eble1-7/+11
#1867716) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2021 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07Added support for --extra-opts in all C plugins (disabled by default, see ↵Thomas Guyot-Sionnest1-0/+7
configure --help) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27--help output cleanup (plus removal of spaces on blank lines)Thomas Guyot-Sionnest1-18/+21
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31Bump plugin/ to GPLv3 (check_overcr to check_users)Thomas Guyot-Sionnest1-21/+18
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1917 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10Plenty of french translations (and a few fixes BTW)Thomas Guyot-Sionnest1-1/+1
- No more fuzzy french translations - Only (!) 355 strings to translate git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1859 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-11Fix broken usage2 in check_snmp and check_clusterThomas Guyot-Sionnest1-2/+2
Fix check_cluster blocking some special characters for thresholds ("-", "@", "~") git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1827 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-09Fix check_snmp buffer overflow (CVE-2007-5623)Thomas Guyot-Sionnest1-6/+10
This patch comes from the Gentoo Portage tree but I couldn't find the author. I sent an email and will give credits when I get an answer. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1814 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-09Fix missing \n in --help outputThomas Guyot-Sionnest1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1812 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-24Hide the SNMP community string (and v3 passwords) from error messagesHolger Weiss1-3/+10
(Bernhard Fischer on nagiosplug-devel@) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1809 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29check_snmp don't warn anymore if something is printed on stderrThomas Guyot-Sionnest1-2/+9
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1721 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29change a bunch of whitespaces (no code was harmed)Thomas Guyot-Sionnest1-22/+22
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1720 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-15Fix bug #1344584: Counter64 values not handled correctlyThomas Guyot-Sionnest1-22/+26
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1687 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-02Fix parsing of multiple OIDs sets needmibs = TRUEThomas Guyot-Sionnest1-4/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1605 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-20Reverting back accidently regressed codeTon Voon1-6/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1513 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19adding missing check_snmpBenoit Mortier1-19/+14
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1510 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19Initialise strings for Fedora Core 5 (Henning Schmiedehausen)Ton Voon1-3/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1505 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19Removed asprintf for perf data (Craig Orsinger, Robby Giffin - 1310495)Ton Voon1-3/+5
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1504 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19type variable not cleared in Sol 10 (Kyle Tucker)Ton Voon1-0/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1503 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-21cleaning help and usageBenoit Mortier1-74/+63
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1437 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-20cleaning help and usage + licenseBenoit Mortier1-22/+36
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1435 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-25Use coreutils' regexp libraries, so regexp always available nowTon Voon1-15/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1403 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-24Variables need to be declared at top of code for better portabilityTon Voon1-1/+1
(Gerhard Lausser) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1399 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-31code cleanups, largely resulting from turning on -Wall. mostlyM. Sean Finney1-2/+2
unused variables and explicit casting issues, but there were a couple gotchas in there too. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1267 f882894a-f735-0410-b71e-b25c423dba1c
2005-06-01only load mibs if needed or specified - patch 1212395Subhendu Ghosh1-10/+32
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1187 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-25support for getnext - 1106430Subhendu Ghosh1-2/+18
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1182 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-25v2c support - 1155754Subhendu Ghosh1-1/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1178 f882894a-f735-0410-b71e-b25c423dba1c
2005-04-05This is a first cut at adding performance data to check_snmp. I wasn't sureHarper Mann1-5/+18
how to handle UOM so only values that return SNMP type Counter32: are labled with "c". All other values have a blank UOM. I also left off warn, crit, max and min values in the performance data until we come up with a way to handle them. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1157 f882894a-f735-0410-b71e-b25c423dba1c
2005-01-21Tracker 1106378 fixed - The -t (timeout) arg was not handled correctly when ↵Harper Mann1-7/+18
passed to the snmpget command. Added -e --retries for the correct retries value to snmpcmd. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1092 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-30more internationalization fixesBenoit Mortier1-11/+7
internationalization freeze for beta1 git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1067 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25various fixes for localizationBenoit Mortier1-5/+3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-08patch 1028033Benoit Mortier1-1/+1
minor internationalization fixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1013 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-05Fix for -s string matching (#756567, Tony Missana)Matthew Kent1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1006 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorryBenoit Mortier1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c