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 somewhere
- 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), ]
If you want to test the package before publishing to GitHub, you can use it locally by adding this to your settings.json
"packages": [
{
"type": "folder",
"path": "/path/to/folder"
}
]
And set the path to the folder containing settings.json
and sensors/
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
schemas/
JSON schemas for the configuration files
Links to sensor packages
Example sensor package
https://github.com/simplic/simplic-insights-package-example
Various system-related sensors (cpu, ram, ...)
https://github.com/simplic/simplic-insights-package-example
Detect if a RabbitMQ server is available
https://github.com/simplic/simplic-insights-package-example
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