Sentinel is a project that aims to provide a simple and easy-to-use tool for monitoring the status of your servers and processes. It is designed to be used with the integration-connector-agent.
The configuration is done through environment variables and a configuration file. The configuration file is a JSON file that contains the configuration for the services that you want to monitor and some other settings.
Here is an example of a configuration file:
{
"output": [
{
"type": "stdout", // 3 type of output: stdout, file, webhook
"file": { // ONLY if type is file
"path": "./eventsFile/file.log"
},
{ // ONLY if type is webhook - NOT IMPLEMENTED
"url": "http://localhost:8080/webhook",
"authentication": {
// ...
}
}
},
],
"monitor": {
"interval": 30,
"filters": { // Optional
"whitelist": [
"go" // filter only this processes
],
"users": [
"<process_username>" // filter only processes with this username
],
"blacklist": [ // remove this processes from the list
"system"
]
}
},
"server": {
"port": 8080 // Port for the server - NOT IMPLEMENTED
},
"advanced": {
"debug": true, // Enable debug mode - NOT IMPLEMENTED
"omitScanning": [ // Omit output fields - NOT IMPLEMENTED
"process.command",
"process.user"
]
}
}
Actually only this pairs of filters are supported:
- NONE
- whitelist
- blacklist
- users
- whitelist + users
- blacklist + users
NB: whitelist and blacklist are mutually exclusive
CONFIGURATION_PATH=<path_to_configuration_file>
LOG_LEVEL=<log_level> # Default: info
HTTP_PORT=<port> # Default: 8080
HTTP_ADDRESS=<address> # Default: 0.0.0.0
To develop the service locally you need:
Go 1.23+ To start the application locally
- Export the environment variables
export CONFIGURATION_PATH=<path_to_configuration_file>
i.e. you can use one of the example configuration files in the /example
folder
- Run the service
go run ./cmd/agent/main.go
By default the service will run on port 8080