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:
parent
fb05e9ad4b
commit
9e9c8293cd
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user