humitifier
Lightweight monitoring of self-managed servers
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords
Repository
Lightweight monitoring of self-managed servers
Basic Info
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 12
- Releases: 43
Topics
Metadata Files
readme.md
Humitifier
A CMDB + interface for tracking the inventory servers. Based on the infrastructure of Humanities IT within the UU, but probably applicable to other infrastructures too.
Humitifer is split into two-ish components
- Scanner
- Server artefact collection over SSH
- stdout parsing of bash command outputs
- Server
- Processing scan output
- A frontend interface for displaying scan results
- Common
- A shared library for both components, containing mostly data-model code
Is it for me?
A humitifier user has the following properties:
- maintains a bunch of on-prem servers
- doesn't need fancy graphs and metrics, just facts and numbers and maybe some red exclamation marks
- wants to track not just server data, but also if it is time to retire a server and who to contact in that case
Fundamental technology choices
At present, there are 4 core technologies that server as the backbone for the application. Below is a motivation of why they were chosen:
- Django is used as a webserver. It is light-weight, modern, well-maintained, and well-documented. In addition, there is a lot of institutional knowledge about it in the department.
- Versions <3.0 used FastAPI, but as new requirements came in, it was decided to switch to Django to facilitate faster development
- The UI uses TailwindCSS for styling and AlpineJS for interactivity. Tailwind was chosen mostly because the developer didn't want to use UU-Bootstrap. AlpineJS was chosen because it is very modern alternative to jQuery, perfect for the minimal interactivity needed in the app.
- paramiko is used to run remote ssh commands
- Previous versions <4.0 used parallel-ssh, which is a parallel-running optimized libray. Humitifier 4 introduces a different strategy, making paramiko the better fit
- Celery is used to schedule scans/processing/background jobs. The scanner can run as a dedicated scan-worker or a standalone app
- Pydantic is used to describe internal data-models. Chosen for it's advanced serialization and Celery support
- The scanner also uses pydantic-settings for the configuration/cli interface
Setup
Additional components
Humitifier requires a PostgreSQL database and a RabbitMQ instance to run.
You can use the following docker-compose file to set these up:
yaml
services:
server-db:
image: postgres:15
expose:
- "5432"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
rabbitmq:
image: rabbitmq:4-management
expose:
- "5672"
ports:
- "15672:15672"
- "5672:5672"
environment:
RABBITMQ_DEFAULT_USER: humitifier
RABBITMQ_DEFAULT_PASS: humitifier
Server configuration
The server ships with sensible development configuration by default. However, it can be configured using environment variables if needed.
Development setup
To run the project locally you must use poetry to install the dependencies.
This will create a virtual environment and install the dependencies in it.
bash
poetry install
To run a local development server, you can run python src/manage.py runserver
You will also need to run a Celery worker and scheduler using the
server-codebase. In production, these should be separate. For development,
you can run a combined worker-scheduler:
pythom -m celery -A humitifier_server worker -Q default -l INFO --beat --scheduler django_celery_beat.schedulers:DatabaseScheduler
Agent configuration
The app configuration is written in toml. (Or env vars, if you want)
In it you specify ssh configuration, inventory/database values, and task interval values.
An example config:
```toml
[ssh]
user = "
privatekeypassword = "" # optional
[ssh.bastion] # Optional, can be left out for direct connections
host = "
privatekeypassword = "" # optional
[celery]
rabbitmqurl = "amqp://
``
Place this file inhumitifier-scanner/.local/config.toml`
Development Setup
To run the project locally you must use poetry to install the dependencies.
This will create a virtual environment and install the dependencies in it.
bash
poetry install
Either run the scanner manually using cli.py (./cli.py -h for usage).
Or run
Production setup
The suggested production setup uses docker-compose.
Refer to the example file for a configuration.
Owner
- Name: Centre for Digital Humanities
- Login: CentreForDigitalHumanities
- Kind: organization
- Email: cdh@uu.nl
- Location: Netherlands
- Website: https://cdh.uu.nl/
- Repositories: 39
- Profile: https://github.com/CentreForDigitalHumanities
Interdisciplinary centre for research and education in computational and data-driven methods in the humanities.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: humitifier
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Ty
family-names: Mees
email: t.d.mees@uu.nl
affiliation: Utrecht University
- given-names: Donatas
family-names: Rasiukevicius
email: d.rasiukevicius@uu.nl
affiliation: Utrecht University
orcid: 'https://orcid.org/0009-0006-3103-0108'
abstract: Monitoring server infrastructure and health
keywords:
- infrastructure
- health checks
GitHub Events
Total
- Create event: 58
- Release event: 31
- Issues event: 40
- Watch event: 2
- Delete event: 23
- Issue comment event: 18
- Push event: 258
- Pull request review event: 33
- Pull request review comment event: 30
- Pull request event: 66
Last Year
- Create event: 58
- Release event: 31
- Issues event: 40
- Watch event: 2
- Delete event: 23
- Issue comment event: 18
- Push event: 258
- Pull request review event: 33
- Pull request review comment event: 30
- Pull request event: 66
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Mees, T.D. (Ty) | t****s@u****l | 401 |
| Donatas Rasiukevičius | d****s@u****l | 191 |
| Ty Mees | g****t@t****l | 8 |
| Bart Bouter | b****r@u****l | 3 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 87
- Total pull requests: 60
- Average time to close issues: about 2 months
- Average time to close pull requests: about 2 hours
- Total issue authors: 9
- Total pull request authors: 2
- Average comments per issue: 0.29
- Average comments per pull request: 0.02
- Merged pull requests: 56
- Bot issues: 3
- Bot pull requests: 0
Past Year
- Issues: 27
- Pull requests: 49
- Average time to close issues: 28 days
- Average time to close pull requests: about 2 hours
- Issue authors: 6
- Pull request authors: 1
- Average comments per issue: 0.22
- Average comments per pull request: 0.02
- Merged pull requests: 45
- Bot issues: 3
- Bot pull requests: 0
Top Authors
Issue Authors
- fliepeltje (41)
- tymees (19)
- bartbouter (13)
- cdh-sentry-integration[bot] (3)
- 73616e646572 (3)
- falconburrow (2)
- JoramdeGraaf (2)
- gdamaskos (1)
- Abaddon-the-despoiler (1)
Pull Request Authors
- tymees (55)
- fliepeltje (13)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- docker/build-push-action v4 composite
- docker/login-action v1 composite
- gha-utilities/sass-build v0.5.1 composite
- python 3.10 build
- aiosql ^9.0
- aiosqlite ^0.19.0
- fastapi ^0.93.0
- httpx ^0.23.3
- jinja2 ^3.1.2
- parallel-ssh ^2.12.0
- python ^3.10
- rocketry ^2.5.1
- toml ^0.10.2
- uvicorn ^0.21.1
- ansicon 1.89.0 develop
- attrs 22.2.0 develop
- black 23.1.0 develop
- blessed 1.20.0 develop
- bpython 0.24 develop
- charset-normalizer 3.1.0 develop
- curtsies 0.4.1 develop
- cwcwidth 0.1.8 develop
- exceptiongroup 1.1.0 develop
- faker 17.6.0 develop
- fancycompleter 0.9.1 develop
- hypothesis 5.49.0 develop
- hypothesis-auto 1.1.5 develop
- iniconfig 2.0.0 develop
- jinxed 1.2.0 develop
- mypy 1.1.1 develop
- mypy-extensions 1.0.0 develop
- packaging 23.0 develop
- pathspec 0.11.0 develop
- pdbpp 0.10.3 develop
- platformdirs 3.1.0 develop
- pluggy 1.0.0 develop
- pygments 2.14.0 develop
- pyreadline 2.1 develop
- pyrepl 0.9.0 develop
- pytest 7.2.2 develop
- pyxdg 0.28 develop
- requests 2.28.2 develop
- sortedcontainers 2.4.0 develop
- tomli 2.0.1 develop
- wcwidth 0.2.6 develop
- wmctrl 0.4 develop
- anyio 3.6.2
- async-timeout 4.0.3
- asyncpg 0.29.0
- certifi 2022.12.7
- cffi 1.15.1
- click 8.1.3
- colorama 0.4.6
- fastapi 0.93.0
- gevent 22.10.2
- greenlet 2.0.2
- h11 0.14.0
- idna 3.4
- jinja2 3.1.2
- markupsafe 2.1.2
- parallel-ssh 2.12.0
- pycparser 2.21
- pydantic 1.10.6
- python-dateutil 2.8.2
- redbird 0.7.1
- rocketry 2.5.1
- sentry-sdk 1.41.0
- setuptools 67.6.1
- six 1.16.0
- sniffio 1.3.0
- ssh-python 1.0.0
- ssh2-python 1.0.0
- starlette 0.25.0
- toml 0.10.2
- typing-extensions 4.5.0
- urllib3 1.26.15
- uvicorn 0.21.1
- zope-event 4.6
- zope-interface 6.0