diff --git a/.gitignore b/.gitignore
index 3ace1794..c52a7ca9 100755
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@ config/pialert.conf
db/*
db/pialert.db
front/log/*
-front/plugins/**/*.log
+pialert/plugins/**/*.log
**/%40eaDir/
**/@eaDir/
diff --git a/README.md b/README.md
index b71930fe..4915c58c 100755
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ The system continuously scans the network for, **New devices**, **New connection
- [Webhooks](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/WEBHOOK_N8N.md)
- [Home Assistant](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/HOME_ASSISTANT.md)
- [API endpoint](https://github.com/jokob-sk/Pi.Alert/blob/main/docs/API.md)
- - [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) for custom script monitoring
+ - [Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/pialert/plugins) for custom script monitoring
# 📥 Installation
@@ -51,10 +51,10 @@ The system continuously scans the network for, **New devices**, **New connection
- Theme Selection (blue, red, green, yellow, black, purple) and Light/Dark-Mode Switch
- DB maintenance, Backup, Restore tools and CSV Export / Import
- Simple login Support
- - 🌟[Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins)
+ - 🌟[Plugin system](https://github.com/jokob-sk/Pi.Alert/tree/main/pialert/plugins)
- Create custom plugins with automatically generated settings and UI.
- Monitor anything for changes
- - Check the [instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins) carefully if you are up for a challenge! Current plugins include:
+ - Check the [instructions](https://github.com/jokob-sk/Pi.Alert/tree/main/pialert/plugins) carefully if you are up for a challenge! Current plugins include:
- Detecting Rogue DHCP servers via NMAP
- Monitoring HTTP status changes of domains/URLs
- Import devices from DHCP.leases files, a UniFi controller, or an SNMP enabled router
diff --git a/docker-compose.yml b/docker-compose.yml
index 89e91edc..fba9ac15 100755
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -44,8 +44,7 @@ services:
- ${DEV_LOCATION}/front/maintenance.php:/home/pi/pialert/front/maintenance.php
- ${DEV_LOCATION}/front/network.php:/home/pi/pialert/front/network.php
- ${DEV_LOCATION}/front/presence.php:/home/pi/pialert/front/presence.php
- - ${DEV_LOCATION}/front/settings.php:/home/pi/pialert/front/settings.php
- - ${DEV_LOCATION}/front/plugins:/home/pi/pialert/front/plugins
+ - ${DEV_LOCATION}/front/settings.php:/home/pi/pialert/front/settings.php
# DELETE END anyone trying to use this file: comment out / delete ABOVE lines, they are only for development purposes
# ---------------------------------------------------------------------------
environment:
diff --git a/docs/API.md b/docs/API.md
index cd13a241..0987ea49 100755
--- a/docs/API.md
+++ b/docs/API.md
@@ -25,7 +25,7 @@ You can access the following files:
| `table_pholus_scan.json` | The latest state of the [pholus](https://github.com/jokob-sk/Pi.Alert/tree/main/pholus) (A multicast DNS and DNS Service Discovery Security Assessment Tool) scan results. |
| `table_plugins_events.json` | The list of the unprocessed (pending) notification events (plugins_events DB table). |
| `table_plugins_history.json` | The list of notification events history. |
- | `table_plugins_objects.json` | The content of the plugins_objects table. Find more info on the [Plugin system here](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins)|
+ | `table_plugins_objects.json` | The content of the plugins_objects table. Find more info on the [Plugin system here](https://github.com/jokob-sk/Pi.Alert/tree/main/pialert/plugins)|
| `language_strings.json` | The content of the language_strings table, which in turn is loaded from the plugins `config.json` definitions. |
| `table_custom_endpoint.json` | A custom endpoint generated by the SQL query specified by the `API_CUSTOM_SQL` setting. |
| `table_settings.json` | The content of the settings table. |
diff --git a/docs/README.md b/docs/README.md
index 8930f931..1e8655f7 100755
--- a/docs/README.md
+++ b/docs/README.md
@@ -18,7 +18,7 @@ There is also an in-app Help / FAQ section that should be answering frequently a
- [Debugging tips](/docs/DEBUG_TIPS.md)
- [API endpoints details](/docs/API.md)
-- [Plugin system details and how to develop your own](/front/plugins/README.md)
+- [Plugin system details and how to develop your own](/pialert/plugins/README.md)
- [Network treemap configuration](/docs/NETWORK_TREE.md)
- [Gmail as SMTP server for sending emails](/docs/SMTP_GMAIL.md)
- [Subnets and VLANs configuration for arp-scan](/docs/SUBNETS.md)
diff --git a/front/deviceDetails.php b/front/deviceDetails.php
index f5bb00d7..7fb46aa2 100755
--- a/front/deviceDetails.php
+++ b/front/deviceDetails.php
@@ -107,7 +107,7 @@
@@ -164,6 +177,7 @@
= lang('HelpFAQ_Cat_Detail_303_text');?>
+
@@ -211,7 +225,7 @@
= lang('HelpFAQ_Cat_Network_600_text');?>
-
+
diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php
index 020af74a..1049f86c 100755
--- a/front/php/templates/language/en_us.php
+++ b/front/php/templates/language/en_us.php
@@ -176,6 +176,7 @@ $lang['en_us'] = array(
'DevDetail_Tab_Events' => ' Events',
'DevDetail_Tab_Pholus' => ' Pholus',
'DevDetail_Tab_PholusEmpty' => 'Nothing sniffed out with Pholus for this device.',
+'DevDetail_Tab_Plugins' => ' Plugins',
'DevDetail_Tab_NmapTableHeader' => 'Scheduled scan results',
'DevDetail_Tab_NmapTableText' => 'Set up a schedule in Settings',
'DevDetail_Tab_NmapEmpty' => 'No ports detected with Nmap on this device.',
@@ -482,6 +483,8 @@ $lang['en_us'] = array(
'HelpFAQ_Cat_Network_600_head' => 'What is this page for?',
'HelpFAQ_Cat_Network_600_text' => 'This page should offer you the possibility to map the assignment of your network devices. For this purpose, you can create one or more switches, WLANs, routers, etc., provide them with a port number if necessary and assign already detected
devices to them. This assignment is done in the detailed view of the device to be assigned. So it is possible for you to quickly determine to which port a host is connected and if it is online. Read this guide for more info.',
+'HelpFAQ_Cat_Network_601_head' => 'Are there other docs?',
+'HelpFAQ_Cat_Network_601_text' => 'Yes, there are! Check all docs for more info.',
//////////////////////////////////////////////////////////////////
// Front end events
@@ -530,7 +533,7 @@ The arp-scan time itself depends on the number of IP addresses to check so set t
'TIMEZONE_name' => 'Time zone',
'TIMEZONE_description' => 'Time zone to display stats correctly. Find your time zone here.',
'ENABLE_PLUGINS_name' => 'Enable Plugins',
-'ENABLE_PLUGINS_description' => 'Enables the plugins functionality. Loading plugins requires more hardware resources so you might want to disable them on low-powered system.',
+'ENABLE_PLUGINS_description' => 'Enables the plugins functionality. Loading plugins requires more hardware resources so you might want to disable them on low-powered system.',
'PIALERT_WEB_PROTECTION_name' => 'Enable login',
'PIALERT_WEB_PROTECTION_description' => 'When enabled a login dialog is displayed. Read below carefully if you get locked out of your instance.',
'PIALERT_WEB_PASSWORD_name' => 'Login password',
@@ -552,21 +555,6 @@ The arp-scan time itself depends on the number of IP addresses to check so set t
'UI_PRESENCE_name' => 'Show in presence chart',
'UI_PRESENCE_description' => 'Select what statuses should be shown in the Device presence over time chart in the Devices page. (CTRL + Click to select/deselect)',
-// New device defaults
-'NewDeviceDefaults_display_name' => 'New device defaults',
-'NewDeviceDefaults_icon' => '',
-'NEWDEV_SCAN_name' => 'Scan device',
-'NEWDEV_SCAN_description' => 'The default value of the Scan device dropdown. Select 1 if newly discovered devices should be scanned (this will result in Yes being selected in the dropdown) or 0, if not.',
-'NEWDEV_ALERT_ALL_name' => 'Alert All Events',
-'NEWDEV_ALERT_ALL_description' => 'The default value of the Alert All Events checkbox (1 is checked, 0 is unchecked).',
-'NEWDEV_ALERT_DWN_name' => 'Alert Down',
-'NEWDEV_ALERT_DWN_description' => 'The default value of the Alert Down checkbox (1 is checked, 0 is unchecked).',
-'NEWDEV_NEWDEV_name' => 'New Device',
-'NEWDEV_NEWDEV_description' => 'The default value of the New Device checkbox (1 is checked, 0 is unchecked).',
-'NEWDEV_ARCHIVED_name' => 'Archived',
-'NEWDEV_ARCHIVED_description' => 'The default value of the Archived checkbox (1 is checked, 0 is unchecked).',
-'NEWDEV_SKIPNTF_name' => 'Skip repeated notifications for',
-'NEWDEV_SKIPNTF_description' => 'The default value of the Skip repeated notifications for dropdown. Select the number of hours for which repeated notifications should be ignored for.',
//Email
'Email_display_name' => 'Email',
diff --git a/front/php/templates/language/es_es.php b/front/php/templates/language/es_es.php
index 478b1d3c..849562d9 100755
--- a/front/php/templates/language/es_es.php
+++ b/front/php/templates/language/es_es.php
@@ -519,7 +519,7 @@ $lang['es_es'] = array(
'TIMEZONE_name' => 'Zona horaria',
'TIMEZONE_description' => 'La zona horaria para mostrar las estadísticas correctamente. Encuentra tu zona horaria aquí.',
'ENABLE_PLUGINS_name' => 'Habilitar complementos',
-'ENABLE_PLUGINS_description' => 'Habilita la funcionalidad de los complementos. Cargar los complementos requiere más recursos de hardware, así que quizás quieras desactivarlo en hardware poco potente.',
+'ENABLE_PLUGINS_description' => 'Habilita la funcionalidad de los complementos. Cargar los complementos requiere más recursos de hardware, así que quizás quieras desactivarlo en hardware poco potente.',
'PIALERT_WEB_PROTECTION_name' => 'Habilitar inicio de sesión',
'PIALERT_WEB_PROTECTION_description' => 'Cuando está habilitado, se muestra un cuadro de diálogo de inicio de sesión. Lea detenidamente a continuación si se le bloquea el acceso a su instancia.',
'PIALERT_WEB_PASSWORD_name' => 'Contraseña de inicio de sesión',
diff --git a/front/plugins.php b/front/plugins.php
index b3b8ca41..3df5d682 100755
--- a/front/plugins.php
+++ b/front/plugins.php
@@ -14,7 +14,7 @@
';
}
@@ -140,7 +140,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
$input = "";
// text - textbox
- if($set['Type'] == 'text' )
+ if($set['Type'] == 'text' || $set['Type'] == 'string' || $set['Type'] == 'date-time' )
{
$input = '';
}
diff --git a/pialert/__main__.py b/pialert/__main__.py
index 4a54278a..57dcf91a 100755
--- a/pialert/__main__.py
+++ b/pialert/__main__.py
@@ -275,8 +275,8 @@ def main ():
# send all configured notifications
send_notifications(db)
- # clean up the DB once a day
- if last_cleanup + datetime.timedelta(hours = 24) < time_started:
+ # clean up the DB once an hour
+ if last_cleanup + datetime.timedelta(hours = 1) < time_started:
last_cleanup = time_started
conf.cycle = 'cleanup'
mylog('verbose', ['[MAIN] cycle:',conf.cycle])
diff --git a/pialert/const.py b/pialert/const.py
index edc172e3..0ec8c02d 100755
--- a/pialert/const.py
+++ b/pialert/const.py
@@ -10,7 +10,7 @@ confPath = "/config/pialert.conf"
dbPath = '/db/pialert.db'
-pluginsPath = pialertPath + '/front/plugins'
+pluginsPath = pialertPath + '/pialert/plugins'
logPath = pialertPath + '/front/log'
apiPath = pialertPath + '/front/api/'
fullConfPath = pialertPath + confPath
diff --git a/pialert/device.py b/pialert/device.py
index 9f638b3e..59486824 100755
--- a/pialert/device.py
+++ b/pialert/device.py
@@ -6,6 +6,7 @@ import subprocess
import conf
from helper import timeNow
+from plugin import get_setting_value
from scanners.internet import check_IP_format, get_internet_IP
from logger import mylog, print_log
from mac_vendor import query_MAC_vendor
@@ -192,15 +193,18 @@ def create_new_devices (db):
# arpscan - Create new devices
mylog('debug','[New Devices] 2 Create devices')
- sql.execute (f"""INSERT INTO Devices (dev_MAC, dev_name, dev_Vendor,
+
+ sqlQuery = f"""INSERT INTO Devices (dev_MAC, dev_name, dev_Vendor,
dev_LastIP, dev_FirstConnection, dev_LastConnection,
dev_AlertEvents, dev_AlertDeviceDown, dev_PresentLastScan, dev_Archived, dev_NewDevice, dev_SkipRepeated, dev_ScanCycle)
SELECT cur_MAC, '(unknown)', cur_Vendor, cur_IP, ?, ?,
- {conf.NEWDEV_ALERT_ALL}, {conf.NEWDEV_ALERT_DWN}, 1, {conf.NEWDEV_ARCHIVED}, {conf.NEWDEV_NEWDEV}, {conf.NEWDEV_SKIPNTF}, {conf.NEWDEV_SCAN}
+ {get_setting_value('NEWDEV_dev_AlertEvents')}, {get_setting_value('NEWDEV_dev_AlertDeviceDown')}, 1, {get_setting_value('NEWDEV_dev_Archived')}, {get_setting_value('NEWDEV_dev_NewDevice')}, {get_setting_value('NEWDEV_dev_SkipRepeated')}, {get_setting_value('NEWDEV_dev_ScanCycle')}
FROM CurrentScan
WHERE cur_ScanCycle = ?
AND NOT EXISTS (SELECT 1 FROM Devices
- WHERE dev_MAC = cur_MAC) """,
+ WHERE dev_MAC = cur_MAC) """
+ mylog('debug',f'[New Devices] 2 Create devices SQL: {sqlQuery}')
+ sql.execute (sqlQuery,
(startTime, startTime, conf.cycle) )
# Pi-hole - Insert events for new devices
@@ -225,7 +229,7 @@ def create_new_devices (db):
dev_AlertEvents, dev_AlertDeviceDown, dev_PresentLastScan, dev_Archived, dev_NewDevice, dev_SkipRepeated, dev_ScanCycle)
SELECT PH_MAC, PH_Name, PH_Vendor, IFNULL (PH_IP,'-'),
?, ?,
- {conf.NEWDEV_ALERT_ALL}, {conf.NEWDEV_ALERT_DWN}, 1, {conf.NEWDEV_ARCHIVED}, {conf.NEWDEV_NEWDEV}, {conf.NEWDEV_SKIPNTF}, {conf.NEWDEV_SCAN}
+ {get_setting_value('NEWDEV_dev_AlertEvents')}, {get_setting_value('NEWDEV_dev_AlertDeviceDown')}, 1, {get_setting_value('NEWDEV_dev_Archived')}, {get_setting_value('NEWDEV_dev_NewDevice')}, {get_setting_value('NEWDEV_dev_SkipRepeated')}, {get_setting_value('NEWDEV_dev_ScanCycle')}
FROM PiHole_Network
WHERE NOT EXISTS (SELECT 1 FROM Devices
WHERE dev_MAC = PH_MAC) """,
@@ -261,7 +265,7 @@ def create_new_devices (db):
WHERE D2.DHCP_MAC = D1.DHCP_MAC
ORDER BY DHCP_DateTime DESC LIMIT 1),
'(unknown)', ?, ?,
- {conf.NEWDEV_ALERT_ALL}, {conf.NEWDEV_ALERT_DWN}, 1, {conf.NEWDEV_ARCHIVED}, {conf.NEWDEV_NEWDEV}, {conf.NEWDEV_SKIPNTF}, {conf.NEWDEV_SCAN}
+ {get_setting_value('NEWDEV_dev_AlertEvents')}, {get_setting_value('NEWDEV_dev_AlertDeviceDown')}, 1, {get_setting_value('NEWDEV_dev_Archived')}, {get_setting_value('NEWDEV_dev_NewDevice')}, {get_setting_value('NEWDEV_dev_SkipRepeated')}, {get_setting_value('NEWDEV_dev_ScanCycle')}
FROM DHCP_Leases AS D1
WHERE NOT EXISTS (SELECT 1 FROM Devices
WHERE dev_MAC = DHCP_MAC) """,
diff --git a/pialert/initialise.py b/pialert/initialise.py
index 23ffeb90..512de48b 100755
--- a/pialert/initialise.py
+++ b/pialert/initialise.py
@@ -86,13 +86,13 @@ def importConfigs (db):
conf.DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', 'integer', '', 'General')
conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', 'integer', "0", 'General')
- # New device defaults
- conf.NEWDEV_SCAN = ccd('NEWDEV_SCAN', 1 , c_d, 'Scan Device', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
- conf.NEWDEV_ALERT_ALL = ccd('NEWDEV_ALERT_ALL', 0 , c_d, 'Alert All Events', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
- conf.NEWDEV_ALERT_DWN = ccd('NEWDEV_ALERT_DWN', 0 , c_d, 'Alert Down', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
- conf.NEWDEV_NEWDEV = ccd('NEWDEV_NEWDEV', 1 , c_d, 'New Device', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
- conf.NEWDEV_ARCHIVED = ccd('NEWDEV_ARCHIVED', 0 , c_d, 'Archived', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
- conf.NEWDEV_SKIPNTF = ccd('NEWDEV_SKIPNTF', 0 , c_d, 'Skip repeated notifications for', 'selectinteger', "['0', '1', '8', '24', '168']", 'NewDeviceDefaults')
+ # # New device defaults
+ # conf.NEWDEV_SCAN = ccd('NEWDEV_SCAN', 1 , c_d, 'Scan Device', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
+ # conf.NEWDEV_ALERT_ALL = ccd('NEWDEV_ALERT_ALL', 0 , c_d, 'Alert All Events', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
+ # conf.NEWDEV_ALERT_DWN = ccd('NEWDEV_ALERT_DWN', 0 , c_d, 'Alert Down', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
+ # conf.NEWDEV_NEWDEV = ccd('NEWDEV_NEWDEV', 1 , c_d, 'New Device', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
+ # conf.NEWDEV_ARCHIVED = ccd('NEWDEV_ARCHIVED', 0 , c_d, 'Archived', 'selectinteger', "['0', '1']", 'NewDeviceDefaults')
+ # conf.NEWDEV_SKIPNTF = ccd('NEWDEV_SKIPNTF', 0 , c_d, 'Skip repeated notifications for', 'selectinteger', "['0', '1', '8', '24', '168']", 'NewDeviceDefaults')
# Email
conf.REPORT_MAIL = ccd('REPORT_MAIL', False , c_d, 'Enable email', 'boolean', '', 'Email', ['test'])
@@ -227,7 +227,7 @@ def importConfigs (db):
# -----------------
# Plugins END
-
+ # write_file(self.path, json.dumps(self.jsonData))
diff --git a/front/plugins/README.md b/pialert/plugins/README.md
similarity index 94%
rename from front/plugins/README.md
rename to pialert/plugins/README.md
index 22790f9d..7ee91335 100755
--- a/front/plugins/README.md
+++ b/pialert/plugins/README.md
@@ -2,15 +2,15 @@
### Script based plugins
-- [website_monitor (WEBMON)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/website_monitor/)
-- [dhcp_servers (DHCPSRVS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_servers/)
-- [dhcp_leases (DHCPLSS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/dhcp_leases/)
-- [unifi_import (UNFIMP)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/unifi_import/)
-- [snmp_discovery (SNMPDSC)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/snmp_discovery/)
-- [undiscoverables (UNDIS)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/)
+- [website_monitor (WEBMON)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/website_monitor/)
+- [dhcp_servers (DHCPSRVS)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/dhcp_servers/)
+- [dhcp_leases (DHCPLSS)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/dhcp_leases/)
+- [unifi_import (UNFIMP)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/unifi_import/)
+- [snmp_discovery (SNMPDSC)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/snmp_discovery/)
+- [undiscoverables (UNDIS)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/undiscoverables/)
### SQL query based plugins
-- [nmap_services (NMAPSERV)](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/nmap_services/)
+- [nmap_services (NMAPSERV)](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/nmap_services/)
## 🌟 Create a custom plugin: Overview
@@ -111,7 +111,7 @@ Any of the above datasources have to return a "table" of the exact structure as
### 👍 Python script.py tips
-The [Undicoverables plugins `script.py` file](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/undiscoverables/script.py) is a good and simple example to start with if you are considering creating a custom plugin. It uses the [`plugin_helper.py` library](https://github.com/jokob-sk/Pi.Alert/blob/main/front/plugins/plugin_helper.py) that significantly simplifies the creation of your custom script.
+The [Undicoverables plugins `script.py` file](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/undiscoverables/script.py) is a good and simple example to start with if you are considering creating a custom plugin. It uses the [`plugin_helper.py` library](https://github.com/jokob-sk/Pi.Alert/blob/main/pialert/plugins/plugin_helper.py) that significantly simplifies the creation of your custom script.
#### last_result.log examples
@@ -234,7 +234,7 @@ The `params` array in the `config.json` is used to enable the user to change the
Passing user defined settings to a command. Let's say, you want to have a script, that is called with a user-defined parameter called `urls`:
```bash
-root@server# python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com
+root@server# python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls=https://google.com,https://duck.com
```
* You can allow the user to add URLs to a setting with the `function` property set to a custom name, such as `urls_to_check` (this is not a reserved name from the section "Supported settings `function` values" below).
@@ -255,7 +255,7 @@ root@server# python3 /home/pi/pialert/front/plugins/website_monitor/script.py ur
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls={urls}",
"options": [],
"localized": ["name", "description"],
"name" : [{
@@ -269,7 +269,7 @@ root@server# python3 /home/pi/pialert/front/plugins/website_monitor/script.py ur
}
```
-During script execution, the app will take the command `"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}"`, take the `{urls}` wildcard and replace it by with the value from the `WEBMON_urls_to_check` setting. This is because:
+During script execution, the app will take the command `"python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls={urls}"`, take the `{urls}` wildcard and replace it by with the value from the `WEBMON_urls_to_check` setting. This is because:
1) The app checks the `params` entries
2) It finds `"name" : "urls"`
@@ -281,9 +281,9 @@ During script execution, the app will take the command `"python3 /home/pi/pialer
- let's say the setting with the code name `WEBMON_urls_to_check` contains 2 values entered by the user:
- `WEBMON_urls_to_check=['https://google.com','https://duck.com']`
6) The app takes the value from `WEBMON_urls_to_check` and replaces the `{urls}` wildcard in the setting where `"function":"CMD"`, so you go from:
- - `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}`
+ - `python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls={urls}`
- to
- - `python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=https://google.com,https://duck.com`
+ - `python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls=https://google.com,https://duck.com`
Below are some general additional notes, when definig `params`:
diff --git a/front/plugins/dhcp_leases/README.md b/pialert/plugins/dhcp_leases/README.md
similarity index 100%
rename from front/plugins/dhcp_leases/README.md
rename to pialert/plugins/dhcp_leases/README.md
diff --git a/front/plugins/dhcp_leases/config.json b/pialert/plugins/dhcp_leases/config.json
similarity index 99%
rename from front/plugins/dhcp_leases/config.json
rename to pialert/plugins/dhcp_leases/config.json
index f24960d4..67d8d12d 100755
--- a/front/plugins/dhcp_leases/config.json
+++ b/pialert/plugins/dhcp_leases/config.json
@@ -231,7 +231,7 @@
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/dhcp_leases/script.py paths={paths}",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/dhcp_leases/script.py paths={paths}",
"options": [],
"localized": ["name", "description"],
"name" : [{
diff --git a/front/plugins/dhcp_leases/script.py b/pialert/plugins/dhcp_leases/script.py
similarity index 100%
rename from front/plugins/dhcp_leases/script.py
rename to pialert/plugins/dhcp_leases/script.py
diff --git a/front/plugins/dhcp_servers/README.md b/pialert/plugins/dhcp_servers/README.md
similarity index 100%
rename from front/plugins/dhcp_servers/README.md
rename to pialert/plugins/dhcp_servers/README.md
diff --git a/front/plugins/dhcp_servers/config.json b/pialert/plugins/dhcp_servers/config.json
similarity index 99%
rename from front/plugins/dhcp_servers/config.json
rename to pialert/plugins/dhcp_servers/config.json
index 0d51badd..cb539f02 100755
--- a/front/plugins/dhcp_servers/config.json
+++ b/pialert/plugins/dhcp_servers/config.json
@@ -221,7 +221,7 @@
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/dhcp_servers/script.py",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/dhcp_servers/script.py",
"options": [],
"localized": ["name", "description"],
"name" : [{
diff --git a/front/plugins/dhcp_servers/script.py b/pialert/plugins/dhcp_servers/script.py
similarity index 100%
rename from front/plugins/dhcp_servers/script.py
rename to pialert/plugins/dhcp_servers/script.py
diff --git a/pialert/plugins/newdev_template/README.md b/pialert/plugins/newdev_template/README.md
new file mode 100755
index 00000000..58fe1202
--- /dev/null
+++ b/pialert/plugins/newdev_template/README.md
@@ -0,0 +1 @@
+Template for new devices
\ No newline at end of file
diff --git a/pialert/plugins/newdev_template/config.json b/pialert/plugins/newdev_template/config.json
new file mode 100755
index 00000000..ed3690c4
--- /dev/null
+++ b/pialert/plugins/newdev_template/config.json
@@ -0,0 +1,535 @@
+{
+ "code_name": "Devices.new",
+ "template_type": "database-entry",
+ "unique_prefix": "NEWDEV",
+ "enabled": true,
+ "data_source": "template",
+ "localized": ["display_name", "description", "icon"],
+ "display_name": [{
+ "language_code": "en_us",
+ "string": "New Devices"
+ }],
+ "description": [{
+ "language_code": "en_us",
+ "string": "The template used for new devices."
+ }],
+ "icon": [
+ {
+ "language_code": "en_us",
+ "string": ""
+ }
+ ],
+ "settings":[
+ {
+ "function": "dev_MAC",
+ "type": "string",
+ "maxLength": 50,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device MAC"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The MAC address of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_Name",
+ "type": "string",
+ "maxLength": 50,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Name"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The name of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_Owner",
+ "type": "string",
+ "maxLength": 30,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Owner"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The owner of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_DeviceType",
+ "type": "string",
+ "maxLength": 30,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Type"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The type of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_Vendor",
+ "type": "string",
+ "maxLength": 250,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Vendor"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The vendor of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_Favorite",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Favorite Device"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether the device is marked as a favorite."
+ }
+ ]
+ },
+ {
+ "function": "dev_Group",
+ "type": "string",
+ "maxLength": 10,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Group"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The group to which the device belongs."
+ }
+ ]
+ },
+ {
+ "function": "dev_Comments",
+ "type": "string",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Comments"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Additional comments or notes about the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_FirstConnection",
+ "type": "string",
+ "format": "date-time",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "First Connection"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The date and time of the first connection with the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_LastConnection",
+ "type": "string",
+ "format": "date-time",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Last Connection"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The date and time of the last connection with the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_LastIP",
+ "type": "string",
+ "maxLength": 50,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Last IP"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The last known IP address of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_StaticIP",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Static IP"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether the device has a static IP address."
+ }
+ ]
+ },
+ {
+ "function": "dev_ScanCycle",
+ "type": "integer",
+ "default_value": 1,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Scan Cycle"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The default value of the Scan device dropdown. Select 1 if newly discovered devices should be scanned (this will result in Yes being selected in the dropdown) or 0, if not."
+ }
+ ]
+ },
+ {
+ "function": "dev_LogEvents",
+ "type": "integer",
+ "default_value": 1,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Log Events"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether events related to the device shouldbe logged."
+ }]
+ },
+ {
+ "function": "dev_AlertEvents",
+ "type": "integer",
+ "default_value": 1,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Alert Events"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether events related to the device should trigger alerts. The default value of the Alert All Events checkbox (1 is checked, 0 is unchecked)."
+ }
+ ]
+ },
+ {
+ "function": "dev_AlertDeviceDown",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Alert Device Down"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether an alert should be triggered when the device goes down. The default value of the Alert Down checkbox (1 is checked, 0 is unchecked)."
+ }
+ ]
+ },
+ {
+ "function": "dev_SkipRepeated",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Skip Repeated"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The default value of the Skip repeated notifications for dropdown. Select the number of hours for which repeated notifications should be ignored for."
+ }
+ ]
+ },
+ {
+ "function": "dev_LastNotification",
+ "type": "string",
+ "format": "date-time",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Last Notification"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The date and time of the last notification sent for the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_PresentLastScan",
+ "type": "integer",
+ "default_value": 1,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Present Last Scan"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether the device was present in the last scan."
+ }
+ ]
+ },
+ {
+ "function": "dev_NewDevice",
+ "type": "integer",
+ "default_value": true,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "New Device"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether the device is considered a new device. The default value of the New Device checkbox (1 is checked, 0 is unchecked)."
+ }
+ ]
+ },
+ {
+ "function": "dev_Location",
+ "type": "string",
+ "maxLength": 250,
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Location"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The location of the device."
+ }
+ ]
+ },
+ {
+ "function": "dev_Archived",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Archived"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "Indicates whether the device is archived. The default value of the Archived checkbox (1 is checked, 0 is unchecked)."
+ }
+ ]
+ },
+ {
+ "function": "dev_Network_Node_MAC_ADDR",
+ "type": "string",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Network Node MAC Address"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The MAC address of the network node."
+ }
+ ]
+ },
+ {
+ "function": "dev_Network_Node_port",
+ "type": "integer",
+ "default_value": 0,
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Network Node Port"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The port number of the network node."
+ }
+ ]
+ },
+ {
+ "function": "dev_Icon",
+ "type": "string",
+ "default_value": "",
+ "options": [],
+ "localized": ["name", "description"],
+ "name": [
+ {
+ "language_code": "en_us",
+ "string": "Device Icon"
+ }
+ ],
+ "description": [
+ {
+ "language_code": "en_us",
+ "string": "The icon associated with the device."
+ }
+ ]
+ }
+ ],
+ "required": [
+ "dev_MAC",
+ "dev_Name",
+ "dev_Owner",
+ "dev_FirstConnection",
+ "dev_LastConnection",
+ "dev_LastIP",
+ "dev_StaticIP",
+ "dev_ScanCycle",
+ "dev_LogEvents",
+ "dev_AlertEvents",
+ "dev_AlertDeviceDown",
+ "dev_SkipRepeated",
+ "dev_LastNotification",
+ "dev_PresentLastScan",
+ "dev_NewDevice",
+ "dev_Location",
+ "dev_Archived",
+ "dev_Network_Node_MAC_ADDR",
+ "dev_Network_Node_port",
+ "dev_Icon"
+ ],
+ "additionalProperties": false
+ }
+
+
+
\ No newline at end of file
diff --git a/front/plugins/nmap_services/README.md b/pialert/plugins/nmap_services/README.md
similarity index 88%
rename from front/plugins/nmap_services/README.md
rename to pialert/plugins/nmap_services/README.md
index 1f7b52f0..2f10e3e9 100755
--- a/front/plugins/nmap_services/README.md
+++ b/pialert/plugins/nmap_services/README.md
@@ -4,7 +4,7 @@ This plugin shows all Services discovered by regular NMAP scans. It's also a sam
### Usage
-- The sql query from the `NMAPSRV_CMD` setting is used to create source data for this plugin. Column order and values need to adhere to the ones specified in the [documentation](https://github.com/jokob-sk/Pi.Alert/tree/main/front/plugins).
+- The sql query from the `NMAPSRV_CMD` setting is used to create source data for this plugin. Column order and values need to adhere to the ones specified in the [documentation](https://github.com/jokob-sk/Pi.Alert/tree/main/pialert/plugins).
### Notes
diff --git a/front/plugins/nmap_services/config.json b/pialert/plugins/nmap_services/config.json
similarity index 100%
rename from front/plugins/nmap_services/config.json
rename to pialert/plugins/nmap_services/config.json
diff --git a/front/plugins/plugin_helper.py b/pialert/plugins/plugin_helper.py
similarity index 100%
rename from front/plugins/plugin_helper.py
rename to pialert/plugins/plugin_helper.py
diff --git a/front/plugins/snmp_discovery/README.md b/pialert/plugins/snmp_discovery/README.md
similarity index 100%
rename from front/plugins/snmp_discovery/README.md
rename to pialert/plugins/snmp_discovery/README.md
diff --git a/front/plugins/snmp_discovery/config.json b/pialert/plugins/snmp_discovery/config.json
similarity index 97%
rename from front/plugins/snmp_discovery/config.json
rename to pialert/plugins/snmp_discovery/config.json
index 65c9d20d..41f1b527 100755
--- a/front/plugins/snmp_discovery/config.json
+++ b/pialert/plugins/snmp_discovery/config.json
@@ -232,7 +232,7 @@
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/snmp_discovery/script.py routers={s-quote}{routers}{s-quote}",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/snmp_discovery/script.py routers={s-quote}{routers}{s-quote}",
"options": [],
"localized": ["name", "description"],
"name" : [{
@@ -256,7 +256,7 @@
}],
"description": [{
"language_code":"en_us",
- "string" : "A list of snmpwalk commands to execute against IP addresses of roputers/switches with SNMP turned on.
Example with the router on the IP 192.168.1.1: snmpwalk -v 2c -c public -OXsq 192.168.1.1 .1.3.6.1.2.1.3.1.1.2
Only IPv4 supported. Authentication is not supported. More info on the plugin here."
+ "string" : "A list of snmpwalk commands to execute against IP addresses of roputers/switches with SNMP turned on.
Example with the router on the IP 192.168.1.1: snmpwalk -v 2c -c public -OXsq 192.168.1.1 .1.3.6.1.2.1.3.1.1.2
Only IPv4 supported. Authentication is not supported. More info on the plugin here."
}]
},
{
diff --git a/front/plugins/snmp_discovery/script.py b/pialert/plugins/snmp_discovery/script.py
similarity index 97%
rename from front/plugins/snmp_discovery/script.py
rename to pialert/plugins/snmp_discovery/script.py
index f63ab0b5..ecbc9714 100755
--- a/front/plugins/snmp_discovery/script.py
+++ b/pialert/plugins/snmp_discovery/script.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# Example call
-# python3 /home/pi/pialert/front/plugins/snmp_discovery/script.py routers='snmpwalk -v 2c -c public -OXsq 192.168.1.1 .1.3.6.1.2.1.3.1.1.2'
+# python3 /home/pi/pialert/pialert/plugins/snmp_discovery/script.py routers='snmpwalk -v 2c -c public -OXsq 192.168.1.1 .1.3.6.1.2.1.3.1.1.2'
from __future__ import unicode_literals
from time import sleep, time, strftime
diff --git a/front/plugins/undiscoverables/README.md b/pialert/plugins/undiscoverables/README.md
similarity index 100%
rename from front/plugins/undiscoverables/README.md
rename to pialert/plugins/undiscoverables/README.md
diff --git a/front/plugins/undiscoverables/config.json b/pialert/plugins/undiscoverables/config.json
similarity index 97%
rename from front/plugins/undiscoverables/config.json
rename to pialert/plugins/undiscoverables/config.json
index fd316f49..fcefa0db 100755
--- a/front/plugins/undiscoverables/config.json
+++ b/pialert/plugins/undiscoverables/config.json
@@ -51,7 +51,7 @@
{
"function": "CMD",
"type": "readonly",
- "default_value": "python3 /home/pi/pialert/front/plugins/undiscoverables/script.py devices={devices}",
+ "default_value": "python3 /home/pi/pialert/pialert/plugins/undiscoverables/script.py devices={devices}",
"options": [],
"localized": ["name", "description"],
"name": [
diff --git a/front/plugins/undiscoverables/script.py b/pialert/plugins/undiscoverables/script.py
similarity index 96%
rename from front/plugins/undiscoverables/script.py
rename to pialert/plugins/undiscoverables/script.py
index ecfece0c..7bb21f16 100755
--- a/front/plugins/undiscoverables/script.py
+++ b/pialert/plugins/undiscoverables/script.py
@@ -6,7 +6,7 @@ import pathlib
import argparse
import sys
-sys.path.append("/home/pi/pialert/front/plugins")
+sys.path.append("/home/pi/pialert/pialert/plugins")
from plugin_helper import Plugin_Objects
diff --git a/front/plugins/unifi_import/README.md b/pialert/plugins/unifi_import/README.md
similarity index 100%
rename from front/plugins/unifi_import/README.md
rename to pialert/plugins/unifi_import/README.md
diff --git a/front/plugins/unifi_import/config.json b/pialert/plugins/unifi_import/config.json
similarity index 98%
rename from front/plugins/unifi_import/config.json
rename to pialert/plugins/unifi_import/config.json
index 74c01060..83c9293d 100755
--- a/front/plugins/unifi_import/config.json
+++ b/pialert/plugins/unifi_import/config.json
@@ -262,7 +262,7 @@
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/unifi_import/script.py username={username} password={password} host={host} sites={sites} protocol={protocol} port={port} version={version}",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/unifi_import/script.py username={username} password={password} host={host} sites={sites} protocol={protocol} port={port} version={version}",
"options": [],
"localized": ["name", "description"],
"name" : [{
diff --git a/front/plugins/unifi_import/script.py b/pialert/plugins/unifi_import/script.py
similarity index 98%
rename from front/plugins/unifi_import/script.py
rename to pialert/plugins/unifi_import/script.py
index 4bc9bc96..1d9cab2b 100755
--- a/front/plugins/unifi_import/script.py
+++ b/pialert/plugins/unifi_import/script.py
@@ -2,7 +2,7 @@
# Inspired by https://github.com/stevehoek/Pi.Alert
# Example call
-# python3 /home/pi/pialert/front/plugins/unifi_import/script.py username=pialert password=passw0rd host=192.168.1.1 site=default protocol=https:// port=8443
+# python3 /home/pi/pialert/pialert/plugins/unifi_import/script.py username=pialert password=passw0rd host=192.168.1.1 site=default protocol=https:// port=8443
from __future__ import unicode_literals
from time import sleep, time, strftime
diff --git a/front/plugins/website_monitor/README.md b/pialert/plugins/website_monitor/README.md
similarity index 100%
rename from front/plugins/website_monitor/README.md
rename to pialert/plugins/website_monitor/README.md
diff --git a/front/plugins/website_monitor/config.json b/pialert/plugins/website_monitor/config.json
similarity index 99%
rename from front/plugins/website_monitor/config.json
rename to pialert/plugins/website_monitor/config.json
index f58ec798..4bcb0d42 100755
--- a/front/plugins/website_monitor/config.json
+++ b/pialert/plugins/website_monitor/config.json
@@ -256,7 +256,7 @@
{
"function": "CMD",
"type": "text",
- "default_value":"python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls={urls}",
+ "default_value":"python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls={urls}",
"options": [],
"localized": ["name", "description"],
"name" : [{
diff --git a/front/plugins/website_monitor/script.py b/pialert/plugins/website_monitor/script.py
similarity index 98%
rename from front/plugins/website_monitor/script.py
rename to pialert/plugins/website_monitor/script.py
index 7c0d76b6..0a2f350a 100755
--- a/front/plugins/website_monitor/script.py
+++ b/pialert/plugins/website_monitor/script.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# Based on the work of https://github.com/leiweibau/Pi.Alert
-# python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=http://google.com,http://bing.com
+# python3 /home/pi/pialert/pialert/plugins/website_monitor/script.py urls=http://google.com,http://bing.com
from __future__ import unicode_literals
from time import sleep, time, strftime
import requests