Simplic insights host/collector
- Create
settings.json
An example is given assettings.example.json
- Set URL, API key and upload interval
- Configure the sensors you need
- Run
python launcher.py
- Give your package a unique id
- Create a new folder
sensors/<id>/
- Create
__init__.py
andmanifest.json
- Add id, version, name, description and dependencies to
manifest.json
- For each sensor:
- Create and implement a Settings class derived from SettingsBase
- Create and implement a Sensor class derived from SensorBase
- Register all sensors in your
__init__.py
like this:SENSORS = [ SensorDef('my-sensor', MySensor, MySettings), ]
settings.json
- API settings
- Upload settings
min_interval
: Measurements will be batched and sent in this intervalmax_interval
: How long to wait for sensor data until sending an empty packet
This is is useful to notify the server that this Host still runs, even if there is no sensor data available
- Sensors:
type
: ID of the sensor class, aspackage:identifier
name
: Display nameinterval
: Update interval
launcher.py
- The main entry point.
- Copies used sensor packages
- Installs required dependencies.
main.py
- Loads the settings file
- Measures sensor values
- Uploads values to an API.
core/
Core library used by sensors
sensors/
Built-in sensors
sensors/<pkg>/manifest.json
Used by the loader to install dependencies
Can be used later for an online index of sensors
sensors/<pkg>/__init__.py
Entry point for a sensor package
schemas/
JSON schemas for the configuration files
The following section contains the available sensor types
- CPU usage
- Get CPU usage
- RAM usage
- Get RAM and Swap usage
- Disk usage
- Get total and available disk usage
- Path exists
- Check if a file or directory exists
- Path Age
- Check if a file or directory was modified recently
Checks whether a RabbitMQ server is available and accepts connections
Checks whether a Redis server is available and accepts connections
Checks whether a sybase sql anywhere server is available and accepts connections
Checks whether a mssql server is available and accepts connections
Checks whether a given service is running
Checks whether a process is running
Checks whether an http(s) endpoint is available, by sending a HEAD-Request