|
@@ -1,10 +1,48 @@
|
|
|
-
|
|
|
-
|
|
|
-from monitoringplugin import MonitoringPlugin
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+import os
|
|
|
import re
|
|
|
+import sys
|
|
|
import urllib2
|
|
|
|
|
|
+try:
|
|
|
+ from monitoringplugin import MonitoringPlugin
|
|
|
+except ImportError:
|
|
|
+ print '=========================='
|
|
|
+ print 'AIKS! Python import error!'
|
|
|
+ print '==========================\n'
|
|
|
+ print 'Could not find "monitoringplugin.py"!\n'
|
|
|
+ print 'Did you download "%s"' % os.path.basename(sys.argv[0])
|
|
|
+ print 'without "monitoringplugin.py"?\n'
|
|
|
+ print 'Please go back to'
|
|
|
+ print 'http://oss.teamix.org/projects/monitoringplugins/ and download it,'
|
|
|
+ print 'or even better:'
|
|
|
+ print 'get a hole archive at http://oss.teamix.org/projects/monitoringplugins/files\n'
|
|
|
+ sys.exit(127)
|
|
|
+
|
|
|
+
|
|
|
plugin = MonitoringPlugin(pluginname='check_apaches', tagforstatusline='APACHE', description='Check Apache workers', version='0.1')
|
|
|
|
|
|
plugin.add_cmdlineoption('-H', '', 'host', 'Hostname/IP to check', default='localhost')
|