Plugins 0.2 - Reports working + Report status setting

This commit is contained in:
Jokob-sk
2023-02-19 13:08:41 +11:00
parent 86315a245b
commit 2ef631a440
7 changed files with 462 additions and 161 deletions

View File

@@ -2347,7 +2347,7 @@ def send_notifications ():
if 'plugins' in INCLUDED_SECTIONS: if 'plugins' in INCLUDED_SECTIONS:
# Compose Plugins Section # Compose Plugins Section
sqlQuery = """SELECT * from Plugins_Events where Status == 'new'""" sqlQuery = """SELECT Plugin, Object_PrimaryId, Object_SecondaryId, DateTimeChanged, Watched_Value1, Watched_Value2, Watched_Value3, Watched_Value4, Status from Plugins_Events"""
notiStruc = construct_notifications(sqlQuery, "Plugins") notiStruc = construct_notifications(sqlQuery, "Plugins")
@@ -2357,6 +2357,9 @@ def send_notifications ():
mail_text = mail_text.replace ('<PLUGINS_TABLE>', notiStruc.text + '\n') mail_text = mail_text.replace ('<PLUGINS_TABLE>', notiStruc.text + '\n')
mail_html = mail_html.replace ('<PLUGINS_TABLE>', notiStruc.html) mail_html = mail_html.replace ('<PLUGINS_TABLE>', notiStruc.html)
# check if we need to report something
plugins_report = plugin_check_smth_to_report(json_plugins)
json_final = { json_final = {
"internet": json_internet, "internet": json_internet,
@@ -2373,11 +2376,12 @@ def send_notifications ():
mail_html = generate_mac_links (mail_html, deviceUrl) mail_html = generate_mac_links (mail_html, deviceUrl)
# Write output emails for debug # Write output emails for debug
write_file (logPath + '/report_output.json', json.dumps(json_final))
write_file (logPath + '/report_output.txt', mail_text) write_file (logPath + '/report_output.txt', mail_text)
write_file (logPath + '/report_output.html', mail_html) write_file (logPath + '/report_output.html', mail_html)
# Send Mail # Send Mail
if json_internet != [] or json_new_devices != [] or json_down_devices != [] or json_events != [] or json_ports != [] or debug_force_notification: if json_internet != [] or json_new_devices != [] or json_down_devices != [] or json_events != [] or json_ports != [] or debug_force_notification or plugins_report:
update_api(True) update_api(True)
@@ -2431,6 +2435,9 @@ def send_notifications ():
sql.execute ("""UPDATE Events SET eve_PendingAlertEmail = 0 sql.execute ("""UPDATE Events SET eve_PendingAlertEmail = 0
WHERE eve_PendingAlertEmail = 1""") WHERE eve_PendingAlertEmail = 1""")
# clear plugin events
sql.execute ("DELETE FROM Plugins_Events")
changedPorts_json_struc = None changedPorts_json_struc = None
# DEBUG - print number of rows updated # DEBUG - print number of rows updated
@@ -2457,22 +2464,22 @@ def construct_notifications(sqlQuery, tableTitle, skipText = False, suppliedJson
else: else:
json_struc = suppliedJsonStruct json_struc = suppliedJsonStruct
json = json_struc.json jsn = json_struc.json
html = "" html = ""
text = "" text = ""
if json["data"] != []: if len(jsn["data"]) > 0:
text = tableTitle + "\n---------\n" text = tableTitle + "\n---------\n"
html = convert(json, build_direction=build_direction, table_attributes=table_attributes) html = convert(jsn, build_direction=build_direction, table_attributes=table_attributes)
html = format_table(html, "data", headerProps, tableTitle).replace('<ul>','<ul style="list-style:none;padding-left:0">') html = format_table(html, "data", headerProps, tableTitle).replace('<ul>','<ul style="list-style:none;padding-left:0">')
headers = json_struc.columnNames headers = json_struc.columnNames
# prepare text-only message # prepare text-only message
if skipText == False: if skipText == False:
for device in json["data"]:
for device in jsn["data"]:
for header in headers: for header in headers:
padding = "" padding = ""
if len(header) < 4: if len(header) < 4:
@@ -2484,7 +2491,7 @@ def construct_notifications(sqlQuery, tableTitle, skipText = False, suppliedJson
for header in headers: for header in headers:
html = format_table(html, header, thProps) html = format_table(html, header, thProps)
return noti_struc(json, text, html) return noti_struc(jsn, text, html)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
class noti_struc: class noti_struc:
@@ -3295,19 +3302,20 @@ def get_table_as_json(sqlQuery):
result = {"data":[]} result = {"data":[]}
for row in rows: for row in rows:
tmp = fill_row(columnNames, row) tmp = row_to_json(columnNames, row)
result["data"].append(tmp) result["data"].append(tmp)
return json_struc(result, columnNames) return json_struc(result, columnNames)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
class json_struc: class json_struc:
def __init__(self, json, columnNames): def __init__(self, jsn, columnNames):
self.json = json # mylog('verbose', [' [] tmp: ', str(json.dumps(jsn))])
self.json = jsn
self.columnNames = columnNames self.columnNames = columnNames
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def fill_row(names, row): # Creates a JSON object from a DB row
def row_to_json(names, row):
rowEntry = {} rowEntry = {}
@@ -3577,6 +3585,21 @@ def handle_test(testType):
mylog('info', ['[', timeNow(), '] END Test: ', testType]) mylog('info', ['[', timeNow(), '] END Test: ', testType])
#-------------------------------------------------------------------------------
# Return setting value
def get_setting_value(key):
set = get_setting(key)
if get_setting(key) is not None:
setVal = set[6] # setting value
setTyp = set[3] # setting type
return setVal
return ''
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Return whole setting touple # Return whole setting touple
def get_setting(key): def get_setting(key):
@@ -3813,6 +3836,8 @@ def execute_plugin(plugin):
# Check if watched values changed for the given plugin # Check if watched values changed for the given plugin
def process_plugin_events(plugin): def process_plugin_events(plugin):
global pluginObjects, pluginEvents
pluginPref = plugin["unique_prefix"] pluginPref = plugin["unique_prefix"]
plugObjectsArr = get_sql_array ("SELECT * FROM Plugins_Objects where Plugin = '" + str(pluginPref)+"'") plugObjectsArr = get_sql_array ("SELECT * FROM Plugins_Objects where Plugin = '" + str(pluginPref)+"'")
@@ -3983,6 +4008,27 @@ def resolve_wildcards(command, params):
return command return command
#-------------------------------------------------------------------------------
# Check if there are events which need to be reported on based on settings
def plugin_check_smth_to_report(notifs):
for notJsn in notifs:
pref = notJsn['Plugin'] #"Plugin" column
stat = notJsn['Status'] #"Status" column
val = get_setting_value(pref + '_REPORT_ON')
if set is not None:
# report if there is at least one value in teh events to be reported on
# future improvement - selectively remove events based on this
if stat in val:
return True
return False
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Flattens a setting to make it passable to a script # Flattens a setting to make it passable to a script
def plugin_param_from_glob_set(globalSetting): def plugin_param_from_glob_set(globalSetting):

View File

@@ -34,14 +34,11 @@
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px"> <td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
<INTERNET_TABLE> <INTERNET_TABLE>
<NEW_DEVICES_TABLE> <NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE> <DOWN_DEVICES_TABLE>
<EVENTS_TABLE> <EVENTS_TABLE>
<PORTS_TABLE> <PORTS_TABLE>
<PLUGINS_TABLE>
</td> </td>
</tr> </tr>

View File

@@ -38,15 +38,10 @@
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px"> <td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
<INTERNET_TABLE> <INTERNET_TABLE>
<NEW_DEVICES_TABLE> <NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE> <DOWN_DEVICES_TABLE>
<EVENTS_TABLE> <EVENTS_TABLE>
<PORTS_TABLE> <PORTS_TABLE>
<PLUGINS_TABLE> <PLUGINS_TABLE>
<tr> <tr>

View File

@@ -14,6 +14,9 @@ services:
- ${LOGS_LOCATION}:/home/pi/pialert/front/log - ${LOGS_LOCATION}:/home/pi/pialert/front/log
# DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes # DELETE START anyone trying to use this file: comment out / delete BELOW lines, they are only for development purposes
- ${DEV_LOCATION}/back/pialert.py:/home/pi/pialert/back/pialert.py - ${DEV_LOCATION}/back/pialert.py:/home/pi/pialert/back/pialert.py
- ${DEV_LOCATION}/back/report_template.html:/home/pi/pialert/back/report_template.html
- ${DEV_LOCATION}/back/report_template_new_version.html:/home/pi/pialert/back/report_template_new_version.html
- ${DEV_LOCATION}/back/report_template.txt:/home/pi/pialert/back/report_template.txt
- ${DEV_LOCATION}/pholus:/home/pi/pialert/pholus - ${DEV_LOCATION}/pholus:/home/pi/pialert/pholus
- ${DEV_LOCATION}/dockerfiles:/home/pi/pialert/dockerfiles - ${DEV_LOCATION}/dockerfiles:/home/pi/pialert/dockerfiles
- ${APP_DATA_LOCATION}/pialert/php.ini:/etc/php/7.4/fpm/php.ini - ${APP_DATA_LOCATION}/pialert/php.ini:/etc/php/7.4/fpm/php.ini

View File

@@ -119,17 +119,22 @@ function generateTabs()
$.each(pluginDefinitions, function(index, obj) { $.each(pluginDefinitions, function(index, obj) {
headersHtml = "" headersHtml = ""
headers = [] // headers = []
colDefinitions = []
evRows = "" evRows = ""
obRows = "" obRows = ""
// Generate the header // Generate the header
$.each(obj["database_column_aliases"]["localized"], function(index, locItem){ $.each(obj["database_column_definitions"], function(index, colDef){
headers.push(locItem) if(colDef.show == true)
headersHtml += `<th class="col-sm-2" >${localize(obj["database_column_aliases"], locItem )}</th>` {
colDefinitions.push(colDef)
headersHtml += `<th class="col-sm-2" >${localize(colDef, "name" )}</th>`
}
}); });
// Generate the event rows // Generate the event rows
for(i=0;i<pluginUnprocessedEvents.length;i++) for(i=0;i<pluginUnprocessedEvents.length;i++)
{ {
@@ -137,14 +142,16 @@ function generateTabs()
{ {
clm = "" clm = ""
for(j=0;j<headers.length;j++) for(j=0;j<colDefinitions.length;j++)
{ {
clm += '<td>'+ pluginUnprocessedEvents[i][headers[j]] +'</td>' clm += '<td>'+ pluginUnprocessedEvents[i][colDefinitions[j].column] +'</td>'
} }
evRows += '<tr>' + clm + '</tr>' evRows += '<tr>' + clm + '</tr>'
} }
} }
// Generate the object rows // Generate the object rows
for(i=0;i<pluginObjects.length;i++) for(i=0;i<pluginObjects.length;i++)
{ {
@@ -152,9 +159,9 @@ function generateTabs()
{ {
clm = "" clm = ""
for(j=0;j<headers.length;j++) for(j=0;j<colDefinitions.length;j++)
{ {
clm += '<td>'+ pluginObjects[i][headers[j]] +'</td>' clm += '<td>'+ pluginObjects[i][colDefinitions[j].column] +'</td>'
} }
obRows += '<tr>' + clm + '</tr>' obRows += '<tr>' + clm + '</tr>'
} }

View File

@@ -159,34 +159,23 @@ Example:
} }
``` ```
##### database_column_aliases ##### database_column_definitions
- Only columns specified in the `"localized"` parameter and also with at least an english translation will be shown in the UI. - Only columns with `"show": true` and also with at least an english translation will be shown in the UI.
```json ```json
{ {
"localized": ["Index", "Object_PrimaryID", "DateTime", "Watched_Value1", "Watched_Value2"], "column": "Index",
"Index":[{ "show": false,
"language_code":"en_us", "type": "label",
"string" : "Index" "default_value":"",
}], "options": [],
"Object_PrimaryID":[{ "localized": ["name"],
"language_code":"en_us", "name":[{
"string" : "Monitored URL" "language_code":"en_us",
}], "string" : "N/A"
"DateTime":[{ }]
"language_code":"en_us", }
"string" : "Checked on"
}],
"Watched_Value1":[{
"language_code":"en_us",
"string" : "Status code"
}],
"Watched_Value2":[{
"language_code":"en_us",
"string" : "Latency"
}]
}
``` ```
## Full Example ## Full Example
@@ -223,29 +212,165 @@ Example:
"type" : "setting", "type" : "setting",
"value" : "WEBMON_SQL_internet_ip" "value" : "WEBMON_SQL_internet_ip"
}], }],
"database_column_aliases":{ "database_column_definitions":
"localized": ["Index", "Object_PrimaryID", "DateTime", "Watched_Value1", "Watched_Value2"], [
"Index":[{ {
"language_code":"en_us", "column": "Index",
"string" : "Index" "show": false,
}], "type": "label",
"Object_PrimaryID":[{ "default_value":"",
"language_code":"en_us", "options": [],
"string" : "Monitored URL" "localized": ["name"],
}], "name":[{
"DateTime":[{ "language_code":"en_us",
"language_code":"en_us", "string" : "N/A"
"string" : "Checked on" }]
}], } ,
"Watched_Value1":[{ {
"language_code":"en_us", "column": "Plugin",
"string" : "Status code" "show": false,
}], "type": "label",
"Watched_Value2":[{ "default_value":"",
"language_code":"en_us", "options": [],
"string" : "Latency" "localized": ["name"],
}] "name":[{
}, "language_code":"en_us",
"string" : "N/A"
}]
},
{
"column": "Object_PrimaryID",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Monitored URL"
}]
},
{
"column": "Object_SecondaryD",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "DateTimeCreated",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Created"
}]
},
{
"column": "DateTimeChanged",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Changed"
}]
},
{
"column": "Watched_Value1",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Status code"
}]
},
{
"column": "Watched_Value2",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Latency"
}]
},
{
"column": "Watched_Value3",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "Watched_Value4",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "UserData",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Comments"
}]
},
{
"column": "Status",
"show": true,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Status"
}]
},
{
"column": "Extra",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Extra"
}]
}
],
"settings":[ "settings":[
{ {
"function": "RUN", "function": "RUN",
@@ -274,29 +399,9 @@ Example:
}], }],
"description": [{ "description": [{
"language_code":"en_us", "language_code":"en_us",
"string" : "Comamnd to run" "string" : "Command to run"
}] }]
}, },
{
"function": "FORCE_REPORT",
"type": "boolean",
"default_value": false,
"options": [],
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
"string" : "Force report"
},
{
"language_code":"de_de",
"string" : "Zwing Bericht"
}],
"description": [{
"language_code":"en_us",
"string" : "Force a notification message even if there are no changes detected."
}]
},
{ {
"function": "RUN_SCHD", "function": "RUN_SCHD",
"type": "text", "type": "text",
@@ -336,6 +441,10 @@ Example:
"name" : [{ "name" : [{
"language_code":"en_us", "language_code":"en_us",
"string" : "Run timeout" "string" : "Run timeout"
},
{
"language_code":"de_de",
"string" : "Wartezeit"
}], }],
"description": [{ "description": [{
"language_code":"en_us", "language_code":"en_us",
@@ -350,13 +459,28 @@ Example:
"localized": ["name", "description"], "localized": ["name", "description"],
"name" :[{ "name" :[{
"language_code":"en_us", "language_code":"en_us",
"string" : "Notify on" "string" : "Watched"
}] , }] ,
"description":[{ "description":[{
"language_code":"en_us", "language_code":"en_us",
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is response status code (e.g.: 200, 404)</li><li><code>Watched_Value2</code> is Latency (not recommended)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>" "string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is response status code (e.g.: 200, 404)</li><li><code>Watched_Value2</code> is Latency (not recommended)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
}] }]
}, },
{
"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. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
}]
},
{ {
"function": "urls_to_check", "function": "urls_to_check",
"type": "list", "type": "list",
@@ -384,7 +508,7 @@ Example:
}], }],
"description": [{ "description": [{
"language_code":"en_us", "language_code":"en_us",
"string" : "Getting the IP address of the Router / Internet" "string" : "Unused setting - for demonstration only. Getting the IP address of the Router / Internet. "
}] }]
} }
@@ -393,4 +517,6 @@ Example:
``` ```

View File

@@ -29,37 +29,165 @@
"type" : "setting", "type" : "setting",
"value" : "WEBMON_SQL_internet_ip" "value" : "WEBMON_SQL_internet_ip"
}], }],
"database_column_aliases":{ "database_column_definitions":
"localized": ["Object_PrimaryID", "DateTimeCreated", "DateTimeChanged", "Watched_Value1", "Watched_Value2", "UserData", "Status"], [
"Object_PrimaryID":[{ {
"language_code":"en_us", "column": "Index",
"string" : "Monitored URL" "show": false,
}], "type": "label",
"DateTimeCreated":[{ "default_value":"",
"language_code":"en_us", "options": [],
"string" : "Created" "localized": ["name"],
}], "name":[{
"DateTimeChanged":[{ "language_code":"en_us",
"language_code":"en_us", "string" : "N/A"
"string" : "Changed" }]
}], } ,
"Watched_Value1":[{ {
"language_code":"en_us", "column": "Plugin",
"string" : "Status code" "show": false,
}], "type": "label",
"Watched_Value2":[{ "default_value":"",
"language_code":"en_us", "options": [],
"string" : "Latency" "localized": ["name"],
}], "name":[{
"UserData":[{ "language_code":"en_us",
"language_code":"en_us", "string" : "N/A"
"string" : "Comments" }]
}], },
"Status":[{ {
"language_code":"en_us", "column": "Object_PrimaryID",
"string" : "Status" "show": true,
}] "type": "text",
}, "default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Monitored URL"
}]
},
{
"column": "Object_SecondaryD",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "DateTimeCreated",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Created"
}]
},
{
"column": "DateTimeChanged",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Changed"
}]
},
{
"column": "Watched_Value1",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Status code"
}]
},
{
"column": "Watched_Value2",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Latency"
}]
},
{
"column": "Watched_Value3",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "Watched_Value4",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "N/A"
}]
} ,
{
"column": "UserData",
"show": true,
"type": "text",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Comments"
}]
},
{
"column": "Status",
"show": true,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Status"
}]
},
{
"column": "Extra",
"show": false,
"type": "label",
"default_value":"",
"options": [],
"localized": ["name"],
"name":[{
"language_code":"en_us",
"string" : "Extra"
}]
}
],
"settings":[ "settings":[
{ {
"function": "RUN", "function": "RUN",
@@ -91,26 +219,6 @@
"string" : "Command to run" "string" : "Command to run"
}] }]
}, },
{
"function": "FORCE_REPORT",
"type": "boolean",
"default_value": false,
"options": [],
"localized": ["name", "description"],
"name" : [{
"language_code":"en_us",
"string" : "Force report"
},
{
"language_code":"de_de",
"string" : "Zwing Bericht"
}],
"description": [{
"language_code":"en_us",
"string" : "Force a notification message even if there are no changes detected."
}]
},
{ {
"function": "RUN_SCHD", "function": "RUN_SCHD",
"type": "text", "type": "text",
@@ -150,6 +258,10 @@
"name" : [{ "name" : [{
"language_code":"en_us", "language_code":"en_us",
"string" : "Run timeout" "string" : "Run timeout"
},
{
"language_code":"de_de",
"string" : "Wartezeit"
}], }],
"description": [{ "description": [{
"language_code":"en_us", "language_code":"en_us",
@@ -164,13 +276,28 @@
"localized": ["name", "description"], "localized": ["name", "description"],
"name" :[{ "name" :[{
"language_code":"en_us", "language_code":"en_us",
"string" : "Notify on" "string" : "Watched"
}] , }] ,
"description":[{ "description":[{
"language_code":"en_us", "language_code":"en_us",
"string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is response status code (e.g.: 200, 404)</li><li><code>Watched_Value2</code> is Latency (not recommended)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>" "string" : "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is response status code (e.g.: 200, 404)</li><li><code>Watched_Value2</code> is Latency (not recommended)</li><li><code>Watched_Value3</code> unused </li><li><code>Watched_Value4</code> unused </li></ul>"
}] }]
}, },
{
"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. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
}]
},
{ {
"function": "urls_to_check", "function": "urls_to_check",
"type": "list", "type": "list",
@@ -198,7 +325,7 @@
}], }],
"description": [{ "description": [{
"language_code":"en_us", "language_code":"en_us",
"string" : "Getting the IP address of the Router / Internet" "string" : "Unused setting - for demonstration only. Getting the IP address of the Router / Internet. "
}] }]
} }