1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-22 10:23:46 +01:00

Detection for no configured replicas

This commit is contained in:
Tomas Edwardsson 2013-04-25 01:08:15 +00:00
parent fb05e9ad4b
commit 9e9c8293cd

View File

@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import ldap import ldap
from pynag.Plugins import PluginHelper,critical from pynag.Plugins import PluginHelper,critical, warning
plugin = PluginHelper() plugin = PluginHelper()
@ -49,4 +49,8 @@ for rhost in replication:
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ": if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ":
plugin.status(critical) plugin.status(critical)
if not len(replication):
plugin.add_summary("Warning: No replicas found")
plugin.status(warning)
plugin.exit() plugin.exit()