https://github.com/infrasonar/mysql-probe
InfraSonar MySQL probe
https://github.com/infrasonar/mysql-probe
cesbit infrasonar monitoring mysql mysql-server
Last synced: 5 months ago
JSON representation
InfraSonar MySQL probe
- Host: GitHub
- URL: https://github.com/infrasonar/mysql-probe
- Owner: infrasonar
- License: gpl-3.0
- Created: 2023-05-19T12:08:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-10T07:55:32.000Z (about 1 year ago)
- Last Synced: 2025-06-14T05:02:58.588Z (12 months ago)
- Topics: cesbit, infrasonar, monitoring, mysql, mysql-server
- Language: Python
- Homepage: https://docs.infrasonar.com/collectors/probes/mysql/
- Size: 56.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/infrasonar/mysql-probe/actions)
[](https://github.com/infrasonar/mysql-probe/releases)
# InfraSonar MySQL Probe
Documentation: https://docs.infrasonar.com/collectors/probes/mysql/
## Environment variable
Variable | Default | Description
------------------- | ------------------------------ | ------------
`AGENTCORE_HOST` | `127.0.0.1` | Hostname or Ip address of the AgentCore.
`AGENTCORE_PORT` | `8750` | AgentCore port to connect to.
`INFRASONAR_CONF` | `/data/config/infrasonar.yaml` | File with probe and asset configuration like credentials.
`MAX_PACKAGE_SIZE` | `500` | Maximum package size in kilobytes _(1..2000)_.
`MAX_CHECK_TIMEOUT` | `300` | Check time-out is 80% of the interval time with `MAX_CHECK_TIMEOUT` in seconds as absolute maximum.
`DRY_RUN` | _none_ | Do not run demonized, just return checks and assets specified in the given yaml _(see the [Dry run section](#dry-run) below)_.
`LOG_LEVEL` | `warning` | Log level (`debug`, `info`, `warning`, `error` or `critical`).
`LOG_COLORIZED` | `0` | Log using colors (`0`=disabled, `1`=enabled).
`LOG_FMT` | `%y%m%d %H:%M:%S` | Log format prefix.
## Docker build
```
docker build -t mysql-probe . --no-cache
```
## Config
```yaml
mysql:
config:
username: "my_account@domain"
password: "my_password"
```
## Dry run
Available checks:
- `innodb`
- `mysql`
Create a yaml file, for example _(test.yaml)_:
```yaml
asset:
name: "foo.local"
check: "mysql"
config:
address: "192.168.1.2"
port: 3306 # not required, default MYSQL port is 3306
```
Run the probe with the `DRY_RUN` environment variable set the the yaml file above.
```
DRY_RUN=test.yaml python main.py
```