mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
docs + hiding archived devices in Network view
This commit is contained in:
@@ -49,7 +49,7 @@ A combined approach greatly improves detection robustness:
|
|||||||
|
|
||||||
* `ARPSCAN` (default)
|
* `ARPSCAN` (default)
|
||||||
* `ICMP` (ping)
|
* `ICMP` (ping)
|
||||||
* `NMAPDEV` (nmamp)
|
* `NMAPDEV` (nmap)
|
||||||
|
|
||||||
This hybrid strategy increases reliability, especially for down detection and alerting. See [other plugins](./PLUGINS.md) that might be compatible with your setup. See benefits and drawbacks of individual scan methods in their respective docs.
|
This hybrid strategy increases reliability, especially for down detection and alerting. See [other plugins](./PLUGINS.md) that might be compatible with your setup. See benefits and drawbacks of individual scan methods in their respective docs.
|
||||||
|
|
||||||
|
|||||||
60
docs/WORKFLOW_EXAMPLES.md
Executable file
60
docs/WORKFLOW_EXAMPLES.md
Executable file
@@ -0,0 +1,60 @@
|
|||||||
|
# Workflow examples
|
||||||
|
|
||||||
|
Workflows in NetAlertX automate actions based on real-time events and conditions. Below are practical examples that demonstrate how to build automation using triggers, conditions, and actions.
|
||||||
|
|
||||||
|
## Un-archive devices if detected online
|
||||||
|
|
||||||
|
This workflow automatically unarchives a device if it was previously archived but has now been detected as online.
|
||||||
|
|
||||||
|
### 📋 Use Case
|
||||||
|
|
||||||
|
Sometimes devices are manually archived (e.g., no longer expected on the network), but they reappear unexpectedly. This workflow reverses the archive status when such devices are detected during a scan.
|
||||||
|
|
||||||
|
### ⚙️ Workflow Configuration
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "Un-archive devices if detected online",
|
||||||
|
"trigger": {
|
||||||
|
"object_type": "Devices",
|
||||||
|
"event_type": "update"
|
||||||
|
},
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"logic": "AND",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"field": "devIsArchived",
|
||||||
|
"operator": "equals",
|
||||||
|
"value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"field": "devPresentLastScan",
|
||||||
|
"operator": "equals",
|
||||||
|
"value": "1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"type": "update_field",
|
||||||
|
"field": "devIsArchived",
|
||||||
|
"value": "0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"enabled": "Yes"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🔍 Explanation
|
||||||
|
|
||||||
|
- Trigger: Listens for updates to device records.
|
||||||
|
- Conditions:
|
||||||
|
- `devIsArchived` is `1` (archived).
|
||||||
|
- `devPresentLastScan` is `1` (device was detected in the latest scan).
|
||||||
|
- Action: Updates the device to set `devIsArchived` to `0` (unarchived).
|
||||||
|
|
||||||
|
### ✅ Result
|
||||||
|
|
||||||
|
Whenever a previously archived device shows up during a network scan, it will be automatically unarchived — allowing it to reappear in your device lists and dashboards.
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
devType as type,
|
devType as type,
|
||||||
devLastIP as last_ip,
|
devLastIP as last_ip,
|
||||||
(select devType from Devices a where devMac = "'.$node_mac.'") as node_type
|
(select devType from Devices a where devMac = "'.$node_mac.'") as node_type
|
||||||
FROM Devices WHERE devParentMAC = "'.$node_mac.'" order by port, name asc';
|
FROM Devices WHERE devParentMAC = "'.$node_mac.'" and devIsArchived = 0 order by port, name asc';
|
||||||
|
|
||||||
global $db;
|
global $db;
|
||||||
$func_result = $db->query($func_sql);
|
$func_result = $db->query($func_sql);
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
a.devParentMAC as parent_mac,
|
a.devParentMAC as parent_mac,
|
||||||
a.devIcon as node_icon
|
a.devIcon as node_icon
|
||||||
FROM Devices a
|
FROM Devices a
|
||||||
WHERE a.devType in (".$networkDeviceTypes.")
|
WHERE a.devType in (".$networkDeviceTypes.") and devIsArchived = 0
|
||||||
) t1
|
) t1
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ nav:
|
|||||||
- Reverse Proxy: REVERSE_PROXY.md
|
- Reverse Proxy: REVERSE_PROXY.md
|
||||||
- Webhooks (n8n): WEBHOOK_N8N.md
|
- Webhooks (n8n): WEBHOOK_N8N.md
|
||||||
- Workflows: WORKFLOWS.md
|
- Workflows: WORKFLOWS.md
|
||||||
|
- Workflow Examples: WORKFLOW_EXAMPLES.md
|
||||||
- Docker Swarm: DOCKER_SWARM.md
|
- Docker Swarm: DOCKER_SWARM.md
|
||||||
- Help:
|
- Help:
|
||||||
- Common issues: COMMON_ISSUES.md
|
- Common issues: COMMON_ISSUES.md
|
||||||
|
|||||||
Reference in New Issue
Block a user