diff options
-rw-r--r-- | plugins/check_ldap.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c index 1c09dfa0..cfc8222a 100644 --- a/plugins/check_ldap.c +++ b/plugins/check_ldap.c @@ -1,29 +1,29 @@ /***************************************************************************** -* +* * Monitoring check_ldap plugin -* +* * License: GPL * Copyright (c) 2000-2008 Monitoring Plugins Development Team -* +* * Description: -* +* * This file contains the check_ldap plugin -* -* +* +* * 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/>. -* -* +* +* *****************************************************************************/ /* progname may be check_ldaps */ @@ -234,11 +234,17 @@ main (int argc, char *argv[]) else status = STATE_OK; - status_entries = get_status(num_entries, entries_thresholds); - if (status_entries == STATE_CRITICAL) { - status = STATE_CRITICAL; - } else if (status!=STATE_CRITICAL) { - status = STATE_WARNING; + if(entries_thresholds != NULL) { + if (verbose) { + printf ("entries found: %d\n", num_entries); + print_thresholds("entry threasholds", entries_thresholds); + } + status_entries = get_status(num_entries, entries_thresholds); + if (status_entries == STATE_CRITICAL) { + status = STATE_CRITICAL; + } else if (status != STATE_CRITICAL) { + status = status_entries; + } } /* print out the result */ |