Commit graph

176 commits

Author SHA1 Message Date
Luc Didry
199cbd7927
📝 — Server start is for testing or dev only (fix#35) 2024-04-11 15:38:43 +02:00
Luc Didry
cf4441be29
📝 — Improve help messages 2024-04-11 09:33:10 +02:00
Luc Didry
8b3a8dd153
— Config file option on almost all server commands 2024-04-11 09:12:01 +02:00
Luc Didry
6cb2ccfa3b
🩹 — Fix a relative path bug 2024-04-11 09:06:28 +02:00
Luc Didry
1a44094084
🚚 — Move alembic.ini in argos directory 2024-04-10 17:40:36 +02:00
Luc Didry
fa4de8a2b7
🗃 — Fix some migrations for SQLite 2024-04-10 17:27:50 +02:00
ad5a90c5e7
Move migrations inside the argos/server/migrations directory.
They are required to be accessible by the server when running an
upgrade,  and as such need to part of the packaged files.
2024-04-10 17:26:49 +02:00
Luc Didry
013ee48cf5 🔀 Merge branch 'fix-11' into 'main'
📝 — Improve documentation (fix #11)

Closes #11

See merge request framasoft/framaspace/argos!41
2024-04-10 15:24:35 +00:00
5e757f1861
Split docstring on multiple lines to ease the reading. 2024-04-08 08:37:15 +02:00
1d35ea22ea
Add a new argos version command outputing the version. 2024-04-08 08:37:15 +02:00
c4c8fbbe4d [docs] Enhance models' docstrings 2024-04-05 13:19:26 +02:00
Luc Didry
24e7778fa5
🎨 — Use a POST request for automatic refresh 2024-04-02 12:40:23 +02:00
Luc Didry
8fd45302d2
🐛 — Fix passing the URL of the server to the agent 2024-04-02 12:39:39 +02:00
Luc Didry
0f844cee70
💄 — Add link to dashboard on logo and title 2024-03-27 16:52:24 +01:00
Luc Didry
c79054b48b 🔀 Merge branch 'fix-22' into 'main'
 — Add a command to generate an auth token (fix #22)

Closes #22

See merge request framasoft/framaspace/argos!37
2024-03-27 15:19:52 +00:00
Luc Didry
5914ff889a
— Use background tasks for alerting (fix #23) 2024-03-25 16:23:39 +01:00
Luc Didry
168788eb89
— Add a command to generate an auth token (fix #22) 2024-03-25 15:19:25 +01:00
Luc Didry
ce5019aaba
📝 — Improve documentation (fix #21) 2024-03-25 13:56:45 +01:00
Luc Didry
6f93eeee49
🎨 — Ruff formating 2024-03-25 13:19:07 +01:00
Luc Didry
d19622060f
🎨 — Rename connect_db_at_startup function 2024-03-21 15:50:17 +01:00
Luc Didry
064e43dc01
🗃 — Add ON DELETE CASCADE to results’ task_id constraint 2024-03-21 15:50:16 +01:00
Luc Didry
cf609eae6b
🎨 — Improve code structure following review of MR !25 2024-03-21 15:49:40 +01:00
Luc Didry
8875c704ee
💄 — Use an argos server command to do alembic migrations 2024-03-21 15:49:40 +01:00
Luc Didry
f976905433
♻ — Move tasks config (re)loading into a command 2024-03-21 15:49:40 +01:00
Luc Didry
e3b1b714b3
🐛 — Delete tasks which are not in config file anymore (fix #19) 2024-03-21 15:49:39 +01:00
Luc Didry
8e9c892b57
🩹 — Fix to-process severity renaming leftover 2024-03-20 09:34:23 +01:00
Luc Didry
49f64b0054
🩹 — Remove merge leftover 2024-03-14 16:49:03 +01:00
Luc Didry
be647a80b2
🩹 — Fix bad route name called in alerting.py 2024-03-14 16:49:03 +01:00
Luc Didry
9427f8e301
🩹 — Fix bad variable name 2024-03-14 16:49:03 +01:00
Luc Didry
9ff2814789
🗃 — Make simpler DB query in get_agents_view 2024-03-14 16:49:03 +01:00
Luc Didry
67d92499bb
📝 — Add response examples for swagger/redoc in routes/api 2024-03-14 16:49:03 +01:00
Luc Didry
098575f186
— Link to reschedule non-ok checks (fix #27) 2024-03-14 16:49:03 +01:00
Luc Didry
76bd10108d
🚨 — Improve djlint test and fix its warnings/errors 2024-03-14 16:49:02 +01:00
Luc Didry
024fd4c911
🚨 — Fix pylint warnings 2024-03-14 16:49:02 +01:00
Luc Didry
d0a097cf80
🎨 — Rename Task submitted_at to last_severity_update 2024-03-14 16:49:02 +01:00
Luc Didry
f2cec6a8ae
🗃💄🎨 — Lot of changes: DB, UI and some code improvements
- 🗃 Store last status and submitted_at in Task. Reduce queries number
- 🗃 Add an Unknown status
- 💄 Add a logo
- 💄 Add a navbar
- 💄 Add a filter on domains page
- 🎨 Use url_for in every templates’ href
2024-03-14 16:49:02 +01:00
Luc Didry
cb81b80b54
🩹💄 — Fix auto-refresh form + limit delay input width 2024-03-14 16:47:30 +01:00
Luc Didry
a64022d724
✏ — Fix typo in variable name 2024-03-14 15:08:55 +01:00
Luc Didry
9fb6d7b078
🩹 — Reintroduce validate_max_results and use it 2023-12-18 08:22:37 +01:00
a8d86ea525 refactor: add a coroutine decorator for the click commands 2023-12-16 23:05:08 +01:00
Luc Didry
fff99f3b6c
📝 — Add links to API doc in footer. Fix #24 2023-12-14 16:56:22 +01:00
Luc Didry
56169b5430
🐛 — Remove selected_at on task once we got result + other things
- 🗃️ — lighten the stale lock removing query
- 💄 — introduce min value for --max-lock-seconds option
- 💄 — introduce min value for --max-results option
- 🐛 — fix display of `cleandb` command
2023-12-14 16:47:00 +01:00
Luc Didry
9df5af7cb4
🎨 — Better domains sorting on domain view 2023-12-14 16:43:45 +01:00
Luc Didry
9316aa9a79
🐛 — Fix domains sorting on domains view 2023-12-14 16:43:45 +01:00
Luc Didry
94aae86564 Merge branch 'fix-frequency' into 'main'
🐛 — Fix websites frequency parsing

See merge request framasoft/framaspace/argos!28
2023-12-14 15:41:47 +00:00
Luc Didry
34dee83701
🐛 — Fix websites frequency parsing 2023-12-14 16:39:37 +01:00
Luc Didry
c4bbda52a5
🎨🔥 — Don’t use js for auto-refresh 2023-12-14 16:38:39 +01:00
Luc Didry
cd7adafe7d
— Add autorefresh feature on dashboard 2023-12-14 16:36:53 +01:00
Luc Didry
a4163b5e25
💄 — Add previous status in notifications 2023-12-14 16:31:51 +01:00
Luc Didry
9ed58220f4
🎨 — Make each handler build its own message 2023-12-14 16:31:51 +01:00
Luc Didry
2ab9afabc9
— Use alerts config in handle_alert 2023-12-14 16:31:51 +01:00
Luc Didry
39eace6152
💄 — Add link to task view in notifications 2023-12-14 16:31:51 +01:00
Luc Didry
04aaa3d8d7
Merge branch 'fix-16' into fix-15 2023-12-14 16:31:37 +01:00
Luc Didry
dc49f0bb3e
🚨 — Fix pylint warnings 2023-12-14 16:25:46 +01:00
Luc Didry
67bacc226a
🚨 — Fix pylint warnings 2023-12-14 16:25:46 +01:00
Luc Didry
ec97d98231
🎨 — Split mail in subject + content 2023-12-14 16:25:46 +01:00
Luc Didry
abe4f418b7
— Implement gotify alerts. Fix #16 2023-12-14 16:25:46 +01:00
Luc Didry
2ffea278dd
🎨 — Improve mail alerting code 2023-12-14 16:25:46 +01:00
Luc Didry
de1f0cc22a
— Implement mail alerts. Fix #15 2023-12-14 16:25:46 +01:00
Luc Didry
3600c2b4f7 🩹 — Update pydantic schema for alerts 2023-12-14 15:20:46 +01:00
Luc Didry
fec8395039 🩹 — Raise checks timeout 2023-12-14 15:20:46 +01:00
Luc Didry
c909f7179b 📝 — Improve documentation 2023-12-14 15:20:46 +01:00
Luc Didry
4930286380 🐛 — Fix cog not working 2023-12-14 15:20:45 +01:00
Luc Didry
e10f4e9c2d Use Pylint 2023-12-14 15:20:33 +01:00
Luc Didry
ca09506a11 💄 — Improve links in footer 2023-12-04 17:25:37 +01:00
Luc Didry
d1462684fe 💄 — Add link to repository in footer (Fix #17) 2023-12-04 10:41:48 +01:00
Luc Didry
88b1ca4d9e 🐛 — Fix get_severity_counts returned result 2023-11-28 17:20:00 +01:00
94049bc0ff Merge branch 'djlint' into 'main'
🚨👷 — Add djlint in CI + fix djlint warnings

See merge request framasoft/framaspace/argos!10
2023-11-22 15:36:12 +00:00
Luc Didry
207c4c54fc 📝 — Update agent doc (on using the env vars) 2023-11-22 16:00:54 +01:00
Luc Didry
61c3dd3fa7 🚨👷 — Add djlint in CI + fix djlint warnings 2023-11-22 15:54:37 +01:00
Luc Didry
b21399792e Merge branch 'almet/fix-serverstart' into 'main'
Call uvicorn via python rather than subprocess

See merge request framasoft/framaspace/argos!8
2023-11-22 13:13:43 +00:00
eaff5e8989 Merge branch 'fix-13' into 'main'
 — Allow to use env vars for agent’s token and server URL. Fix #13

Closes #13

See merge request framasoft/framaspace/argos!9
2023-11-22 13:12:20 +00:00
c09527f561 Replace dict.set() by dict.setdefault() 2023-11-22 14:10:31 +01:00
Luc Didry
fd6fdfefa9 — Allow to use env vars for agent’s token and server URL. Fix #13
Avoid to leak the token in `htop` for ex.
2023-11-22 13:48:42 +01:00
e652659fb6 Merge branch 'quick-overview' into 'main'
💄 — Quick supervision overview on homepage

See merge request framasoft/framaspace/argos!7
2023-11-22 12:34:17 +00:00
27857c182a Make queries.get_severity_counts() return a dict 2023-11-22 13:25:33 +01:00
fa9e79d72c Call uvicorn via python rather than subprocess 2023-11-22 13:15:32 +01:00
Luc Didry
1f33110e68 🚨 — HTML linting 2023-11-21 16:11:10 +01:00
Luc Didry
d2a12aea30 💄 — Quick supervision overview on homepage 2023-11-21 16:11:03 +01:00
6e408e1cf7 Allow defining db pool size and max overflow in the settings 2023-11-16 17:08:05 +01:00
Luc Didry
43078da6a1 🔧 — Default SQLAlchemy pool size is too low for production
Defaults values:
- pool_size=5
- max_overflow=10

We should have a setting in the configuration file for that.
2023-11-16 17:08:05 +01:00
76528b0e24 Use new Pydantic ConfigDict. Fixes #10 2023-11-16 01:00:20 +01:00
33becdd753 Accept all HTTP returned status for the SSL check.
Fixes #7
2023-10-30 15:53:23 +01:00
0e08bc8be6 Allow exceptions for advanced checks.
- See more information about this in #7
2023-10-30 15:02:13 +01:00
e20b1fcabe Merge branch 'improve-logs' into 'main'
🔊 — Improve alerting log

See merge request framasoft/framaspace/argos!4
2023-10-26 10:46:09 +00:00
Luc Didry
09047fe69a 🔊 — Improve alerting log 2023-10-25 16:49:59 +02:00
Luc Didry
5ef8600034 🐛 — Fix SSL check cert
Some (stupid) services don’t answer the same way when getting requested with HEAD or GET.
Like GET -> 200, HEAD -> 405.
https://github.com/h2non/imaginary is an example of such a service.
2023-10-25 14:52:17 +02:00
aee1545814 Deduplicate checks from settings. Fixes #5
- Allow the database to have duplicates (previous calls were causing a server crash)
- Add tests scenarii for duplication
2023-10-25 00:00:25 +02:00
7997e9bbcd Remove debug code 2023-10-24 18:51:33 +02:00
b105004f3b Add the number of agents in the index template 2023-10-24 18:01:13 +02:00
5bca4fa261 argos server cleandb now keep a number of results per task 2023-10-20 02:40:06 +02:00
158e7ac44c Create a new http client on agent retry 2023-10-20 01:35:30 +02:00
85735add01 Updates while reading the code with Luc. 2023-10-19 18:10:41 +02:00
a9f823fbfa 🌱 Let's start with the Gitlab CI 2023-10-18 23:17:23 +02:00
9885a5809a Add an 'argos server clean' command that needs to be run periodically to clean the db 2023-10-18 21:45:10 +02:00
54379d04c4 hostname is now used as agent_id, and stored in the db 2023-10-18 21:29:09 +02:00
cd243d92dc Refactor argos agent to use classes 2023-10-18 17:48:42 +02:00
31edb95cb8 Don't let the agents fail. Retry on error 2023-10-18 17:28:27 +02:00
55d59283f8 Better formatting for domain page 2023-10-18 17:04:54 +02:00
d6c048fb5b Speed-up SQL queriying by using DISTINCT statement 2023-10-18 16:31:47 +02:00