"
+ },
+ {
+ "equals": "watched-changed",
+ "replacement": "
"
+ },
+ {
+ "equals": "new",
+ "replacement": "
"
+ }
+ ],
+ "localized": ["name"],
+ "name":[{
+ "language_code":"en_us",
+ "string" : "Status"
+ }]
+ }
+ ],
+ "settings":[
+ {
+ "function": "RUN",
+ "type": "selecttext",
+ "default_value":"disabled",
+ "options": ["disabled", "once", "schedule", "always_after_scan", "on_new_device"],
+ "localized": ["name", "description"],
+ "name" :[{
+ "language_code":"en_us",
+ "string" : "When to run"
+ }],
+ "description": [{
+ "language_code":"en_us",
+ "string" : "Specify when the SQL query is executed."
+ }]
+ },
+ {
+ "function": "CMD",
+ "type": "text",
+ "default_value":"SELECT dv.dev_Name as Object_PrimaryID, cast(dv.dev_LastIP as VARCHAR(100)) || ':' || cast( SUBSTR(ns.Port ,0, INSTR(ns.Port , '/')) as VARCHAR(100)) as Object_SecondaryID, datetime() as DateTime, ns.Service as Watched_Value1, ns.State as Watched_Value2, 'null' as Watched_Value3, 'null' as Watched_Value4, ns.Extra as Extra FROM (SELECT * FROM Nmap_Scan) ns LEFT JOIN (SELECT dev_Name, dev_MAC, dev_LastIP FROM Devices) dv ON ns.MAC = dv.dev_MAC",
+ "options": [],
+ "localized": ["name", "description"],
+ "name" : [{
+ "language_code":"en_us",
+ "string" : "SQL to run"
+ }],
+ "description": [{
+ "language_code":"en_us",
+ "string" : "This SQL query is used to populate the coresponding UI tables under the Plugins section."
+ }]
+ },
+ {
+ "function": "RUN_SCHD",
+ "type": "text",
+ "default_value":"0 2 * * *",
+ "options": [],
+ "localized": ["name", "description"],
+ "name" : [{
+ "language_code":"en_us",
+ "string" : "Schedule"
+ }],
+ "description": [{
+ "language_code":"en_us",
+ "string" : "Only enabled if you select
schedule in the
NMAPSRV_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at
crontab.guru). For example entering
0 4 * * * will run the scan after 4 am in the
TIMEZONE you set above. Will be run NEXT time the time passes."
+ }]
+ },
+ {
+ "function": "RUN_TIMEOUT",
+ "type": "integer",
+ "default_value":5,
+ "options": [],
+ "localized": ["name", "description"],
+ "name" : [{
+ "language_code":"en_us",
+ "string" : "Run timeout"
+ },
+ {
+ "language_code":"de_de",
+ "string" : "Wartezeit"
+ }],
+ "description": [{
+ "language_code":"en_us",
+ "string" : "Maximum time in seconds to wait for the call to finish. If this time is exceeded the script is aborted."
+ }]
+ },
+ {
+ "function": "WATCH",
+ "type": "multiselect",
+ "default_value":["Watched_Value1"],
+ "options": ["Watched_Value1","Watched_Value2","Watched_Value3","Watched_Value4"],
+ "localized": ["name", "description"],
+ "name" :[{
+ "language_code":"en_us",
+ "string" : "Watched"
+ }] ,
+ "description":[{
+ "language_code":"en_us",
+ "string" : "Send a notification if selected values change. Use
CTRL + Click to select/deselect.
Watched_Value1 is service type (e.g.: http, ssh)Watched_Value2 is Status (open or closed)Watched_Value3 unused Watched_Value4 unused
"
+ }]
+ },
+ {
+ "function": "REPORT_ON",
+ "type": "multiselect",
+ "default_value":["new","watched-changed"],
+ "options": ["new","watched-changed","watched-not-changed"],
+ "localized": ["name", "description"],
+ "name" :[{
+ "language_code":"en_us",
+ "string" : "Report on"
+ }] ,
+ "description":[{
+ "language_code":"en_us",
+ "string" : "Send a notification only on these statuses.
new means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered.
watched-changed means that selected
Watched_ValueN columns changed."
+ }]
+ }
+ ]
+}
+
diff --git a/front/plugins/website_monitor/config.json b/front/plugins/website_monitor/config.json
index 6109cc7e..4bcff216 100755
--- a/front/plugins/website_monitor/config.json
+++ b/front/plugins/website_monitor/config.json
@@ -1,6 +1,7 @@
{
"code_name": "website_monitor",
- "unique_prefix": "WEBMON",
+ "unique_prefix": "WEBMON",
+ "data_source": "python-script",
"localized": ["display_name", "description", "icon"],
"display_name" : [{
"language_code":"en_us",
@@ -192,15 +193,15 @@
"options": [
{
"equals": "watched-not-changed",
- "replacement": "
"
+ "replacement": "
"
},
{
"equals": "watched-changed",
- "replacement": "
"
+ "replacement": "
"
},
{
"equals": "new",
- "replacement": "
"
+ "replacement": "
"
}
],
"localized": ["name"],
@@ -276,7 +277,7 @@
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
- "string" : "API endpoint"
+ "string" : "API endpoint (not implemented)"
}],
"description": [{
"language_code":"en_us",
@@ -299,7 +300,7 @@
}],
"description": [{
"language_code":"en_us",
- "string" : "Maximum time in seconds to wait for a Website monitor check to finish for any url."
+ "string" : "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
}]
},
{
@@ -335,7 +336,7 @@
{
"function": "urls_to_check",
"type": "list",
- "default_value":[],
+ "default_value":["https://google.com", "https://duck.com"],
"options": [],
"localized": ["name", "description"],
"name" : [{