Skip to content

Commit 75c266c

Browse files
authored
Merge pull request #1660 from netalertx/next_release
Next release
2 parents 1ede51c + 62e4070 commit 75c266c

47 files changed

Lines changed: 318 additions & 138 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/DEVICE_FILTERS.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
## Device List & Display Configuration
2+
3+
The **Devices** page is your primary view into what NetAlertX is monitoring. If devices are missing, unexpected devices appear, or the list doesn’t look the way you expect, the issue is often related to **filters**, **display settings**, or **device visibility configuration**.
4+
5+
This guide focuses on adjusting your view and troubleshooting common display-related issues.
6+
7+
---
8+
9+
## I Don’t See a Device I Expect in *My Devices*
10+
11+
If a device is missing from the **My Devices** list, work through these checks.
12+
13+
### Check Active Filters
14+
15+
The most common cause is that a filter is hiding the device.
16+
17+
![Image](https://docs.netalertx.com/img/ADVISORIES/filters.png)
18+
19+
![Image](https://docs.netalertx.com/img/DEVICE_MANAGEMENT/DeviceDetails_DisplaySettings.png)
20+
21+
Review any active:
22+
23+
* **Status filters** (Online / Offline / Down / Archived)
24+
* **Location** filters
25+
* **Owner / User** filters
26+
* **Device Type** filters
27+
* Search terms entered in the search box
28+
29+
Clear filters first, then reload the page and check again.
30+
31+
### Check global filters
32+
33+
You can select devices of what statuses should be displayed in the My Devices view. This can be adjusted in the _Settings_ section - search for the `UI_MY_DEVICES` setting and verify that the statuses you want to show are selected.
34+
35+
---
36+
37+
### Check Whether the Device Is Hidden
38+
39+
Some devices may be excluded from normal views depending on configuration.
40+
41+
Examples include:
42+
43+
* Archived devices
44+
* Devices marked as ignored (`NEWDEV_ignored_IPs` and `NEWDEV_ignored_MACs` settings)
45+
* Virtual or relationship-only devices excluded from display (setting `UI_hide_rel_types`)
46+
* Devices assigned to another user view or group
47+
48+
If the device exists in the database but is intentionally hidden, it may not appear in default lists.
49+
50+
---
51+
52+
### Confirm the Device Has Been Detected
53+
54+
If the device has never been scanned or synced into NetAlertX yet, it won’t appear in the UI.
55+
56+
Things to check:
57+
58+
* Is the device currently online?
59+
* Has the network scan already run?
60+
* Is the correct scan source enabled?
61+
* If using sync/import, has the sync node completed successfully?
62+
63+
You can also trigger a manual scan and refresh the UI afterward.
64+
65+
---
66+
67+
### Refresh the UI Cache
68+
69+
Sometimes device data updates correctly in the backend but the browser view hasn’t refreshed yet.
70+
71+
Try:
72+
73+
* Clicking the **Reload** icon in the NetAlertX header
74+
* Waiting for the next automatic refresh cycle
75+
* Performing a hard browser refresh (`Ctrl+Shift+R` / `Cmd+Shift+R`)
76+
77+
The built-in **Reload** action is recommended over browser refresh because it clears the application’s internal cache, otherwise cache refresh might take a couple of minutes.
78+
79+
---
80+
81+
## Filtering Your Device View
82+
83+
Filters help narrow large device inventories into manageable views.
84+
85+
Common filtering options include:
86+
87+
| Filter | Use Case |
88+
| --------------- | ----------------------------------------------------------- |
89+
| **Status** | Show only Online, Offline, Down, New, or Archived devices |
90+
| **Location** | View devices from a specific site or branch |
91+
| **Device Type** | Show only servers, network gear, clients, IoT devices, etc. |
92+
| **Owner/User** | Limit results to a specific user or device owner |
93+
| **Search** | Find devices by hostname, IP address, MAC address, or label |
94+
95+
Filters can be combined, which is especially useful for large installations.
96+
97+
Example:
98+
99+
`Status = Down` + `Location = Sydney Office`
100+
101+
This shows only devices currently down at that site. Available filters can be configured via the `UI_columns_filters` setting.
102+
103+
---
104+
105+
## Related Display Settings
106+
107+
Several UI settings affect what appears in the device list.
108+
109+
### Hidden Connections / Virtual Devices
110+
111+
You can hide non-essential relationships or virtual connections from the main view to reduce clutter.
112+
113+
Useful when:
114+
115+
* imported relationships create visual noise
116+
* virtual devices aren’t relevant to daily monitoring
117+
* you want a cleaner operational view
118+
119+
See the `UI_hide_rel_types` setting for details.
120+
121+
---
122+
123+
### Dashboard Block Visibility
124+
125+
If you’re using the dashboard alongside **Devices**, UI Settings allow you to disable blocks that aren’t useful for your workflow.
126+
127+
Common examples:
128+
129+
* Tiles
130+
* Presence widgets
131+
* Summary cards
132+
* Relationship views
133+
134+
This can make the device list easier to focus on.
135+
136+
To configure the above check the `UI_shown_cards`, `UI_DEV_SECTIONS` and `UI_hide_empty` settings.
137+
138+
---
139+
140+
### Auto Refresh
141+
142+
If devices appear stale or statuses don’t update immediately, check **UI refresh settings** (`UI_REFRESH` setting).
143+
144+
A refresh interval between **60–120 seconds** is usually a good balance between responsiveness and browser performance.
145+
146+
---
147+
148+
## Quick Troubleshooting Checklist
149+
150+
Before digging deeper, run through this list:
151+
152+
* [ ] Clear all active filters
153+
* [ ] Search by hostname, MAC address, or IP
154+
* [ ] Confirm the device is not archived or hidden
155+
* [ ] Trigger or verify a recent network scan
156+
* [ ] Use the NetAlertX **Reload** icon to refresh the UI cache
157+
* [ ] Check related UI visibility settings
158+
159+
If the device still doesn’t appear after these checks, review the scan/import logs to confirm it has been discovered successfully by NetAlertX.

docs/PLUGINS_DEV.md

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -302,45 +302,8 @@ Plugin results are displayed in the web interface using various component types.
302302

303303
### Common Display Types
304304

305-
**Read settings in your Python script:**
306-
307-
```python
308-
from helper import get_setting_value
309-
310-
# Read a setting by code name (prefix + function)
311-
api_url = get_setting_value('MYPLN_API_URL')
312-
api_key = get_setting_value('MYPLN_API_KEY')
313-
watch_columns = get_setting_value('MYPLN_WATCH')
314-
315-
print(f"Connecting to {api_url}")
316-
```
317-
318-
**Pass settings as command parameters:**
319-
320-
Define `params` in config to pass settings as script arguments:
321-
322-
```json
323-
{
324-
"params": [
325-
{
326-
"name": "api_url",
327-
"type": "setting",
328-
"value": "MYPLN_API_URL"
329-
}
330-
]
331-
}
332-
```
333-
334-
Then use in `CMD`: `python3 script.py --url={api_url}`
335-
336305
See [PLUGINS_DEV_SETTINGS.md](PLUGINS_DEV_SETTINGS.md) for complete settings documentation, and [PLUGINS_DEV_DATASOURCES.md](PLUGINS_DEV_DATASOURCES.md) for data source details.
337306

338-
[screen1]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins.png "Screen 1"
339-
[screen2]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_settings.png "Screen 2"
340-
[screen3]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_json_settings.png "Screen 3"
341-
[screen4]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_json_ui.png "Screen 4"
342-
[screen5]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_device_details.png "Screen 5"
343-
344307
## Quick Reference: Key Concepts
345308

346309
### Plugin Output Format
@@ -394,3 +357,8 @@ See: [UI Components](PLUGINS_DEV_UI_COMPONENTS.md)
394357
---
395358

396359

360+
[screen1]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins.png "Screen 1"
361+
[screen2]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_settings.png "Screen 2"
362+
[screen3]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_json_settings.png "Screen 3"
363+
[screen4]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_json_ui.png "Screen 4"
364+
[screen5]: https://raw.githubusercontent.com/jokob-sk/NetAlertX/main/docs/img/plugins_device_details.png "Screen 5"

docs/PLUGINS_DEV_DATA_CONTRACT.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,46 @@ Plugins communicate with NetAlertX by writing results to a **pipe-delimited log
1515

1616
**Required Columns:** 9 (mandatory) + up to 4 optional helper columns = 13 total
1717

18+
19+
## Using `plugin_helper.py`
20+
21+
The easiest way to ensure correct output is to use the [`plugin_helper.py`](../front/plugins/plugin_helper.py) library:
22+
23+
```python
24+
from plugin_helper import Plugin_Objects
25+
26+
# Initialize with your plugin's prefix
27+
plugin_objects = Plugin_Objects("YOURPREFIX")
28+
29+
# Add objects
30+
plugin_objects.add_object(
31+
objectPrimaryId="device_id",
32+
objectSecondaryId="192.168.1.1",
33+
DateTime="2023-01-02 15:56:30",
34+
watchedValue1="online",
35+
watchedValue2=None,
36+
watchedValue3=None,
37+
watchedValue4=None,
38+
Extra="Additional data",
39+
ForeignKey="aa:bb:cc:dd:ee:ff",
40+
helpVal1=None,
41+
helpVal2=None,
42+
helpVal3=None,
43+
helpVal4=None
44+
)
45+
46+
# Write results (handles formatting, sanitization, and file creation)
47+
plugin_objects.write_result_file()
48+
```
49+
50+
The library automatically:
51+
52+
- Validates data types
53+
- Sanitizes string values
54+
- Normalizes MAC addresses
55+
- Writes to the correct file location
56+
- Creates the file in `/tmp/log/plugins/last_result.<PREFIX>.log`
57+
1858
## Column Specification
1959

2060
> [!NOTE]
@@ -134,45 +174,6 @@ device|null|2023-01-02 15:56:30|status|null|null|null|null|null|h1|h2|h3|h4
134174
device|null|2023-01-02 15:56:30|status|null|null|null|null|null
135175
```
136176

137-
## Using `plugin_helper.py`
138-
139-
The easiest way to ensure correct output is to use the [`plugin_helper.py`](../front/plugins/plugin_helper.py) library:
140-
141-
```python
142-
from plugin_helper import Plugin_Objects
143-
144-
# Initialize with your plugin's prefix
145-
plugin_objects = Plugin_Objects("YOURPREFIX")
146-
147-
# Add objects
148-
plugin_objects.add_object(
149-
objectPrimaryId="device_id",
150-
objectSecondaryId="192.168.1.1",
151-
DateTime="2023-01-02 15:56:30",
152-
watchedValue1="online",
153-
watchedValue2=None,
154-
watchedValue3=None,
155-
watchedValue4=None,
156-
Extra="Additional data",
157-
ForeignKey="aa:bb:cc:dd:ee:ff",
158-
helpVal1=None,
159-
helpVal2=None,
160-
helpVal3=None,
161-
helpVal4=None
162-
)
163-
164-
# Write results (handles formatting, sanitization, and file creation)
165-
plugin_objects.write_result_file()
166-
```
167-
168-
The library automatically:
169-
170-
- Validates data types
171-
- Sanitizes string values
172-
- Normalizes MAC addresses
173-
- Writes to the correct file location
174-
- Creates the file in `/tmp/log/plugins/last_result.<PREFIX>.log`
175-
176177
## De-duplication
177178

178179
The core runs **de-duplication once per hour** on the `Plugins_Objects` table:
@@ -186,6 +187,7 @@ The core runs **de-duplication once per hour** on the `Plugins_Objects` table:
186187
**Required Format:** `YYYY-MM-DD HH:MM:SS`
187188

188189
**Examples:**
190+
189191
- `2023-01-02 15:56:30`
190192
- `2023-1-2 15:56:30` ❌ (missing leading zeros)
191193
- `2023-01-02T15:56:30` ❌ (wrong separator)

docs/WORKFLOW_EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Sometimes devices are manually archived (e.g., no longer expected on the network
4545
],
4646
"enabled": "Yes"
4747
}
48-
````
48+
```
4949

5050
### 🔍 Explanation
5151

front/css/app.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ h5
3434
a[target="_blank"] {
3535
position: relative;
3636
display: inline-block; /* Needed for positioning */
37-
padding-right: 0.6em; /* Space for the icon */
37+
padding-right: 0.55em; /* Space for the icon */
3838
}
3939

4040
a[target="_blank"]::after {
4141
content: '↗';
4242
position: absolute;
4343
top: 0;
44-
right: 0;
45-
font-size: 0.75em;
44+
right: 0.3em;
45+
font-size: 0.6em;
4646
line-height: 1;
4747
}
4848

@@ -1546,6 +1546,11 @@ textarea[readonly],
15461546
height: 1.5em;
15471547
}
15481548

1549+
#nextScanEta
1550+
{
1551+
padding-left: 1.5em;
1552+
}
1553+
15491554
.info-icon-nav
15501555
{
15511556
top: -6px;

front/devices.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
<div class="box-header">
9898
<div class=" col-sm-8 ">
9999
<h3 id="tableDevicesTitle" class="box-title text-gray "></h3>
100+
<span class="helpIconSmallTopRight">
101+
<a target="_blank" href="https://docs.netalertx.com/DEVICE_FILTERS">
102+
<i class="fa fa-circle-question"></i>
103+
</a>
104+
</span>
100105
<!-- Next scan ETA — populated by sse_manager.js via nax:scanEtaUpdate -->
101106
<small id="nextScanEta" class="text-muted" style="display:none;margin-left:8px;font-weight:normal;font-size:0.75em;"></small>
102107
</div>
@@ -879,6 +884,7 @@ function initializeDatatable (status) {
879884
{className: 'iconColumn text-center', targets: [mapIndx(COL.devIcon)]},
880885
{width: '80px', targets: [mapIndx(COL.devFirstConnection), mapIndx(COL.devLastConnection), mapIndx(COL.devParentChildrenCount), mapIndx(COL.devFQDN)] },
881886
{width: '85px', targets: [mapIndx(COL.devIsRandomMac)] },
887+
{width: '130px', targets: [mapIndx(COL.devLastIP), mapIndx(COL.devIpLong)] },
882888
{width: '30px', targets: [mapIndx(COL.devIcon), mapIndx(COL.devStatus), mapIndx(COL.rowid), mapIndx(COL.devParentPort)] },
883889
{orderData: [mapIndx(COL.devIpLong)], targets: mapIndx(COL.devLastIP) },
884890

@@ -961,16 +967,14 @@ function initializeDatatable (status) {
961967
{targets: [mapIndx(COL.devLastIP)],
962968
'createdCell': function (td, cellData, rowData, row, col) {
963969
if (!emptyArr.includes(cellData)){
964-
$(td).html (`<span class="anonymizeIp">
965-
<a href="http://${cellData}" class="pointer" target="_blank">
966-
${cellData}
967-
</a>
968-
<span class="alignRight lockIcon">
970+
$(td).html (`<div class="anonymizeIp alignRight">
971+
<a href="http://${cellData}" class="pointer" target="_blank">
972+
${cellData}
973+
</a>
969974
<a href="https://${cellData}" class="pointer" target="_blank">
970975
<i class="fa fa-lock "></i>
971976
</a>
972-
<span>
973-
<span>`);
977+
</div>`);
974978
} else {
975979
$(td).html ('');
976980
}

0 commit comments

Comments
 (0)