diff --git a/LogicModules/Examples/Dummy_Multi_Batchscript/Static_Test_Value_Multi.xml b/LogicModules/Examples/Dummy_Multi_Batchscript/Static_Test_Value_Multi.xml new file mode 100644 index 0000000..f9c88b1 --- /dev/null +++ b/LogicModules/Examples/Dummy_Multi_Batchscript/Static_Test_Value_Multi.xml @@ -0,0 +1,185 @@ + + + + 200 + OK + 0 + + + + 1708040532 + Static_Test_Value_Multi + Static Test Value Multi + Dummy Multi-Instance DataSource for testing stuff + batchscript + true + false + 60 + isDevice() + true + true + ad_script + type="embeded" + ad_script + type="embeded" + println "instance1_value##instance1_alias##instance1_description" +println "instance2_value##instance2_alias##instance2_description" +println "instance3_value##instance3_alias##instance3_description" +println "instance4_value##instance4_alias##instance4_description" + 60 + false + true + none + + LMTest + + Uses examples from the following support pages: + +https://www.logicmonitor.com/support/logicmodules/datasources/active-discovery/script-active-discovery + +https://www.logicmonitor.com/support/logicmodules/datasources/data-collection-methods/batchscript-data-collection + + 2 + 1 + + + scripttype + embed + + + + scriptgroovy + // datapoint1 +println "instance1_value.key1=11" +println "instance2_value.key1=21" +println "instance3_value.key1=31" +println "instance4_value.key1=41" + +// datapoint2 +println "instance1_value.key2=12" +println "instance2_value.key2=22" +println "instance3_value.key2=32" +println "instance4_value.key2=42" + +// JSON equivalent +/* +{ + data: { + instance1_value: { + values: { + "key1": 11, + "key2": 12 + } + }, + instance2_value: { + values: { + "key1": 21, + "key2": 22 + } + }, + instance3_value: { + values: { + "key1": 31, + "key2": 32 + } + }, + instance4_value: { + values: { + "key1": 41, + "key2": 42 + } + } + } +} +*/ + + + + windowsscript + + + + + linuxscript + + + + + windowscmdline + + + + + linuxcmdline + + + + + + + datapoint1 + OCJLAasKQF2u6i6bqietZg + 7 + 2 + namevalue + ##WILDVALUE##.key1 + output + + 1 + + + + false + + + + + + + 4 + + + + false + + 0 + 0 + + + datapoint2 + eBnDIJ2eRS-v5SbQfqkhVg + 7 + 2 + namevalue + ##WILDVALUE##.key2 + output + + 1 + + + + false + + + + + + + 4 + + + + false + + 0 + 0 + + + + + + + + + + diff --git a/LogicModules/Examples/Dummy_Multi_Batchscript/ad.groovy b/LogicModules/Examples/Dummy_Multi_Batchscript/ad.groovy new file mode 100644 index 0000000..3cbf1bb --- /dev/null +++ b/LogicModules/Examples/Dummy_Multi_Batchscript/ad.groovy @@ -0,0 +1,4 @@ +println "instance1_value##instance1_alias##instance1_description" +println "instance2_value##instance2_alias##instance2_description" +println "instance3_value##instance3_alias##instance3_description" +println "instance4_value##instance4_alias##instance4_description" \ No newline at end of file diff --git a/LogicModules/Examples/Dummy_Multi_Batchscript/collect.groovy b/LogicModules/Examples/Dummy_Multi_Batchscript/collect.groovy new file mode 100644 index 0000000..f2f7252 --- /dev/null +++ b/LogicModules/Examples/Dummy_Multi_Batchscript/collect.groovy @@ -0,0 +1,43 @@ +// datapoint1 +println "instance1_value.key1=11" +println "instance2_value.key1=21" +println "instance3_value.key1=31" +println "instance4_value.key1=41" + +// datapoint2 +println "instance1_value.key2=12" +println "instance2_value.key2=22" +println "instance3_value.key2=32" +println "instance4_value.key2=42" + +// JSON equivalent +/* +{ + data: { + instance1_value: { + values: { + "key1": 11, + "key2": 12 + } + }, + instance2_value: { + values: { + "key1": 21, + "key2": 22 + } + }, + instance3_value: { + values: { + "key1": 31, + "key2": 32 + } + }, + instance4_value: { + values: { + "key1": 41, + "key2": 42 + } + } + } +} +*/ \ No newline at end of file diff --git a/LogicModules/Examples/Static_Test_Value.xml b/LogicModules/Examples/Static_Test_Value.xml new file mode 100644 index 0000000..78174ca --- /dev/null +++ b/LogicModules/Examples/Static_Test_Value.xml @@ -0,0 +1,117 @@ + + + + 200 + OK + 0 + + + + 1705102894 + Static_Test_Value + Static Test Value + + script + false + false + 60 + isDevice() + false + false + + + + + + 1440 + false + false + none + + LMTest + + + + 2 + 1 + + + scripttype + embed + + + + scriptgroovy + println "datapoint=0" + + + + windowsscript + + + + + linuxscript + + + + + windowscmdline + + + + + linuxcmdline + + + + + properties + + + + + manualConnections + + + + + + + dp_test + lx8L-tZXQZO8_SK76uczug + 7 + 2 + namevalue + datapoint + output + + 1 + + + + false + + + + + + + 4 + + + + false + + 0 + 0 + + + + + + + + + +