Module: check_mk
Branch: master
Commit: f1c8bb0db31ce6cc54f4744562294062eaca5e6e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f1c8bb0db31ce6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Feb 4 19:00:43 2013 +0100
Added small helper for creating random services
---
doc/treasures/ds_random | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/doc/treasures/ds_random b/doc/treasures/ds_random
new file mode 100755
index 0000000..40e171e
--- /dev/null
+++ b/doc/treasures/ds_random
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+# Testing script, that can be used as a datasource program
+# and creates a number of random services with random states
+
+import os, random
+
+print '<<<local>>>'
+for service in os.listdir('/'):
+ state = int(random.random() * 4)
+ print "%d Random_%s - Random Random Random" % (state, service)