mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
LOG_LEVEL fix, WEBMON timeout multiplier, docs, fix for watched-changed #1053
This commit is contained in:
0
front/php/templates/language/ca_ca.json
Normal file → Executable file
0
front/php/templates/language/ca_ca.json
Normal file → Executable file
0
front/php/templates/language/cs_cz.json
Normal file → Executable file
0
front/php/templates/language/cs_cz.json
Normal file → Executable file
0
front/php/templates/language/es_es.json
Normal file → Executable file
0
front/php/templates/language/es_es.json
Normal file → Executable file
0
front/php/templates/language/it_it.json
Normal file → Executable file
0
front/php/templates/language/it_it.json
Normal file → Executable file
0
front/php/templates/language/tr_tr.json
Normal file → Executable file
0
front/php/templates/language/tr_tr.json
Normal file → Executable file
0
front/php/templates/language/zh_cn.json
Normal file → Executable file
0
front/php/templates/language/zh_cn.json
Normal file → Executable file
@@ -24,7 +24,7 @@ sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
|
||||
import conf
|
||||
from const import confFileName, logPath
|
||||
from plugin_helper import Plugin_Objects
|
||||
from logger import mylog, Logger, append_line_to_file, print_log
|
||||
from logger import mylog, Logger, append_line_to_file
|
||||
from helper import timeNowTZ, get_setting_value, hide_email
|
||||
from notification import Notification_obj
|
||||
from database import DB
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
{
|
||||
"name": "urls",
|
||||
"type": "setting",
|
||||
"value": "WEBMON_urls_to_check"
|
||||
"value": "WEBMON_urls_to_check",
|
||||
"timeoutMultiplier": true
|
||||
}
|
||||
],
|
||||
"database_column_definitions": [
|
||||
|
||||
@@ -50,9 +50,12 @@ def main():
|
||||
return
|
||||
|
||||
def check_services_health(site):
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] Checking {site}'])
|
||||
|
||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
try:
|
||||
resp = requests.get(site, verify=False, timeout=10)
|
||||
resp = requests.get(site, verify=False, timeout=get_setting_value('WEBMON_RUN_TIMEOUT'))
|
||||
latency = resp.elapsed.total_seconds()
|
||||
status = resp.status_code
|
||||
except requests.exceptions.SSLError:
|
||||
@@ -61,6 +64,9 @@ def check_services_health(site):
|
||||
except:
|
||||
status = 503
|
||||
latency = 99999
|
||||
|
||||
mylog('verbose', [f'[{pluginName}] Result for {site} (status|latency) : {status}|{latency}'])
|
||||
|
||||
return status, latency
|
||||
|
||||
def service_monitoring(urls, plugin_objects):
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<tr>
|
||||
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
|
||||
<img src="https://netalertx.com/NetAlertX_logo.png" alt="NetAlertX Logo" style="vertical-align: middle; margin-top:-6px" width="32" height="32" />
|
||||
Net<b>Alert</b><sup>x</sup>
|
||||
<span style="padding: 0px 0px 0px 0px;">Net<b>Alert</b><sup>x</sup></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user