1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-05 01:53:44 +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/>.
import ldap
from pynag.Plugins import PluginHelper,critical
from pynag.Plugins import PluginHelper,critical, warning
plugin = PluginHelper()
@ -49,4 +49,8 @@ for rhost in replication:
if rhost[1]['nsds5replicaLastUpdateStatus'][0][:2] != "0 ":
plugin.status(critical)
if not len(replication):
plugin.add_summary("Warning: No replicas found")
plugin.status(warning)
plugin.exit()