2021-05-18 05:14:57 +00:00
|
|
|
# Server
|
|
|
|
|
2022-09-19 12:41:11 +00:00
|
|
|
This is the server component of sysmon.
|
2021-05-18 05:14:57 +00:00
|
|
|
|
2021-09-02 19:40:22 +00:00
|
|
|
## Installation
|
|
|
|
|
2022-01-11 10:23:06 +00:00
|
|
|
Download *.deb* or *.rpm* package and install.
|
|
|
|
|
2022-09-19 12:41:11 +00:00
|
|
|
See the [doc/systemd.md](doc/systemd.md) or [doc/sysv-init.md](doc/sysv-init.md) files for further instructions on running as a system service.
|
2021-09-02 19:40:22 +00:00
|
|
|
|
|
|
|
### Influx Database
|
|
|
|
|
2022-10-28 15:10:22 +00:00
|
|
|
Create a database for the metrics and adjust duration as you prefer:
|
2021-09-02 19:40:22 +00:00
|
|
|
|
|
|
|
```text
|
|
|
|
CREATE DATABASE "sysmon" WITH DURATION 90d REPLICATION 1;
|
|
|
|
```
|
|
|
|
|
2021-05-18 05:14:57 +00:00
|
|
|
## Development
|
|
|
|
|
|
|
|
|
|
|
|
### Build & Test
|
|
|
|
|
|
|
|
Use the gradle build tool, which will download all required dependencies:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
./gradlew clean build
|
|
|
|
```
|
|
|
|
|
|
|
|
### Local Testing
|
|
|
|
|
|
|
|
#### InfluxDB container
|
|
|
|
|
|
|
|
Start the InfluxDB container:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker run --name=influxdb --rm -d -p 8086:8086 influxdb:1.8-alpine
|
|
|
|
```
|
|
|
|
|
|
|
|
To execute the Influx client from within the container:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker exec -it influxdb influx
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Grafana container
|
|
|
|
|
|
|
|
Start the Grafana container, linking it to the InfluxDB container:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker run --name grafana --link influxdb:influxdb --rm -d -p 3000:3000 grafana/grafana:7.1.3
|
|
|
|
```
|
|
|
|
|
|
|
|
Setup Grafana to connect to the InfluxDB container by defining a new datasource on URL *http://influxdb:8086* named *sysmon*.
|
|
|
|
|