Skip to content

Commit 2c66e47

Browse files
Merge branch 'master' into issues/57-move-logger-call-in-subroutine
2 parents bb5a19f + 27c6fb4 commit 2c66e47

45 files changed

Lines changed: 1284 additions & 394 deletions

Some content is hidden

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

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: [openwisp]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: ["https://openwisp.org/sponsorship/"]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Open a bug report
4+
title: "[bug] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of the bug or unexpected behavior.
11+
12+
**Steps To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**System Informatioon:**
27+
28+
- OS: [e.g. Ubuntu 24.04 LTS]
29+
- OpenWrt Version: [e.g. OpenWrt 23.05]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[feature] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Question
3+
about: Please use the Discussion Forum to ask questions
4+
title: "[question] "
5+
labels: question
6+
assignees: ""
7+
---
8+
9+
Please use the [Discussion Forum](https://github.com/orgs/openwisp/discussions) to ask questions.
10+
11+
We will take care of moving the discussion to a more relevant repository if needed.

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
# To get started with Dependabot version updates, you'll need to specify which
3+
# package ecosystems to update and where the package manifests are located.
4+
# Please see the documentation for all configuration options:
5+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "github-actions" # Check for GitHub Actions updates
10+
directory: "/" # The root directory where the Ansible role is located
11+
schedule:
12+
interval: "monthly" # Check for updates monthly
13+
commit-message:
14+
prefix: "[ci] "

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Checklist
2+
3+
- [ ] I have read the [OpenWISP Contributing Guidelines](http://openwisp.io/docs/developer/contributing.html).
4+
- [ ] I have manually tested the changes proposed in this pull request.
5+
- [ ] I have written new test cases for new code and/or updated existing tests for changes to existing code.
6+
- [ ] I have updated the documentation.
7+
8+
## Reference to Existing Issue
9+
10+
Closes #<issue-number>.
11+
12+
Please [open a new issue](https://github.com/openwisp/openwrt-openwisp-monitoring/issues/new/choose) if there isn't an existing issue yet.
13+
14+
## Description of Changes
15+
16+
Please describe these changes.
17+
18+
## Screenshot
19+
20+
Please include any relevant screenshots.

.github/workflows/ci.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: OpenWRT OPENWISP MONITORING CI Build
1+
name: OpenWrt OpenWISP Monitoring CI Build
22

33
on:
44
push:
@@ -11,39 +11,43 @@ on:
1111
jobs:
1212
tests:
1313
name: QA-Checks and Tests
14-
runs-on: ubuntu-20.04
14+
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v6
1717
with:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919

2020
- name: Set up Python
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.7
23+
# This limitation can be removed once docstrfmt
24+
# is upgraded to 2.0.0 or higher (in openwisp-utils).
25+
python-version: "3.13"
2426

25-
- name: Install Python dependencies
26-
run: pip install openwisp-utils[qa]>=0.7
27-
28-
- name: Install Development dependencies
29-
run: sudo ./install-dev.sh
27+
- name: Install dependencies
28+
id: deps
29+
run: |
30+
pip install "openwisp-utils[qa]~=1.2.1"
31+
sudo ./install-dev.sh
3032
3133
- name: QA-Checks
3234
run: ./run-qa-checks
3335
env:
3436
CI: 1
3537

3638
- name: Run sh-checker
37-
uses: luizm/action-sh-checker@master
39+
uses: luizm/action-sh-checker@v0.9.0
3840
env:
3941
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4042
with:
4143
sh_checker_comment: true
4244

4345
- name: Tests
46+
if: ${{ !cancelled() && steps.deps.conclusion == 'success' }}
4447
run: ./runtests
4548

4649
- name: Upload Coverage
50+
if: ${{ success() }}
4751
run: |
4852
cd openwisp-monitoring/tests
4953
luacov-coveralls -v
@@ -52,25 +56,24 @@ jobs:
5256

5357
build:
5458
name: Build and upload package as artifacts
55-
needs: tests
56-
runs-on: ubuntu-20.04
59+
runs-on: ubuntu-24.04
5760
env:
58-
BUILD_DIR: '/home/runner/work/build'
59-
DOWNLOADS_DIR: '/home/runner/work/downloads'
61+
BUILD_DIR: "/home/runner/work/build"
62+
DOWNLOADS_DIR: "/home/runner/work/downloads"
6063
CORES: 2
6164

6265
steps:
63-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v6
6467
with:
6568
ref: ${{ github.event.pull_request.head.sha }}
6669

67-
- name: Cache OpenWRT dependencies
70+
- name: Cache OpenWrt dependencies
6871
id: cache
69-
uses: actions/cache@v2
72+
uses: actions/cache@v5
7073
env:
7174
cache-name: cache-openwrt-dependencies
7275
with:
73-
path: '/home/runner/work/build'
76+
path: "/home/runner/work/build"
7477
key: ${{ runner.os }}-build-${{ env.cache-name }}
7578

7679
- name: Set Environment
@@ -87,17 +90,24 @@ jobs:
8790
CI_CACHE: ${{ steps.cache.outputs.cache-hit }}
8891

8992
- name: Upload packages as artifacts
90-
uses: actions/upload-artifact@v2
93+
if: ${{ github.event_name=='push' }}
94+
uses: actions/upload-artifact@v6
9195
with:
9296
name: Packages
9397
path: "${{ env.DOWNLOADS_DIR }}/${{ env.START_TIME }}"
9498

95-
- name: Setup Google Cloud
96-
uses: google-github-actions/setup-gcloud@v0
99+
- name: Google Cloud Auth
100+
if: ${{ github.event_name=='push' }}
101+
uses: "google-github-actions/auth@v3"
102+
with:
103+
project_id: ${{ secrets.GCS_PROJECT_ID }}
104+
credentials_json: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
105+
106+
- name: Google Cloud Setup
107+
if: ${{ github.event_name=='push' }}
108+
uses: google-github-actions/setup-gcloud@v3
97109
with:
98-
service_account_key: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
99110
project_id: ${{ secrets.GCS_PROJECT_ID }}
100-
export_default_credentials: true
101111

102112
- name: Upload compiled packages to downloads.openwisp.io
103113
if: ${{ github.event_name=='push' }}

CHANGELOG.rst

Lines changed: 82 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,94 @@
11
Change log
2-
^^^^^^^^^^
2+
==========
3+
4+
0.3.0 [2025-10-27]
5+
------------------
6+
7+
Bugfixes
8+
~~~~~~~~
9+
10+
- Switch to portable df output (df -P) `#153
11+
<https://github.com/openwisp/openwrt-openwisp-monitoring/issues/153>`_.
12+
- Fixed issue where WiFi client data was sent even when no clients were
13+
connected.
14+
- Added check to ensure data file exists before sending to prevent errors
15+
`#102
16+
<https://github.com/openwisp/openwrt-openwisp-monitoring/issues/102>`_.
17+
- Ignored duplicate IP addresses in network configuration.
18+
19+
0.2.1 [2024-11-07]
20+
------------------
21+
22+
Bugfixes
23+
~~~~~~~~
24+
25+
- Fixed compiling the package without the ``rpcd-mod-iwinfo`` dependency.
26+
27+
0.2.0 [2024-09-25]
28+
------------------
29+
30+
Features
31+
~~~~~~~~
32+
33+
- Added ``bootup_delay`` option to control delay before the agent starts
34+
on boot.
35+
- Restart the agent when ``openwisp-config`` starts or restarts to ensure
36+
configuration consistency.
37+
- Added ``htmode`` to wireless interface stats for enhanced monitoring.
38+
- Added bitrate, quality, and connected AP information for wireless
39+
"station" mode.
40+
- Added support for using the ``cacert`` and ``capath`` configuration
41+
options defined in the ``openwisp-config`` configuration file for
42+
``curl`` command.
43+
- Allowed compiling the package without the ``rpcd-mod-iwinfo``
44+
dependency. This is beneficial for space-constrained devices that do not
45+
have a WiFi card.
46+
47+
Changes
48+
~~~~~~~
49+
50+
- Allowed WireGuard protocol to be used as a virtual interface type.
51+
- Improved sending of accumulated data by adding a random pause after
52+
every 10 successful requests.
53+
- Enhanced mesh station information handling.
54+
- Stopped sending data after receiving repeated 404 responses to prevent
55+
unnecessary retries.
56+
- Skipped adding the wireless section if the WiFi channel is not
57+
available.
58+
59+
Backward incompatible
60+
+++++++++++++++++++++
61+
62+
- Implemented a randomized backoff mechanism for HTTP requests, replacing
63+
the previous exponential backoff approach.
64+
65+
Bugfixes
66+
~~~~~~~~
67+
68+
- Applied a workaround for devices that incorrectly report zero CPUs,
69+
ensuring at least one CPU is assumed.
70+
- Prevented the addition of bridge members when the list is empty to avoid
71+
unnecessary configurations.
72+
- Discarded data when receiving a bad request response from the server to
73+
avoid re-sending corrupted data.
74+
- Used the correct device network section for STP on OpenWrt versions
75+
greater than 21.
76+
- Skipped adding empty DHCP lease tables to avoid unnecessary data
77+
processing.
78+
- Avoided including mobile signal data if it is not available.
379

480
0.1.1 [2022-06-08]
5-
==================
81+
------------------
682

783
- Fixed crash when ULA prefix is not available
884

985
0.1.0 [2022-05-10]
10-
==================
86+
------------------
1187

1288
First release. Features:
1389

1490
- ``netjson-monitoring`` package
1591
- ``openwisp-monitoring`` package
16-
- resilient metric sending:
17-
when the device cannot communicate with the server, the metrics are
18-
stored in memory until there's enough free memory and sent later
19-
when the communication is established again
92+
- resilient metric sending: when the device cannot communicate with the
93+
server, the metrics are stored in memory until there's enough free
94+
memory and sent later when the communication is established again

CONTRIBUTING.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Please refer to the `Contribution Guidelines <http://openwisp.io/docs/developer/contributing.html>`_.
1+
Please refer to the `Contribution Guidelines
2+
<http://openwisp.io/docs/developer/contributing.html>`_.

0 commit comments

Comments
 (0)