Implemented agent and server
-a
- address and port to run server(default:localhost:8080
)-l
- logging level(default:info
)-f
- path to store file containing metrics in JSON(default:tmp/metrics-db.json
)-r
- load saving data(default: true)-a
- interval of storing data on disk(default: 5 sec)-d
- database's dsn connection configs(default: empty)
-a
- address and port to run server(default:localhost:8080
)-r
- interval of sending metrics to the server(default: 10 sec)-p
- nterval of polling metrics from the runtime(default: 2 sec)
The service allows:
- to collect, store and display metrics
- set up alerts
What is going to be added:
- sending notifications under predefined conditions
- Ping, check service status
Get /ping
Response
- Send batch of metrics
Post /updates
{
[
{
"id": "t",
"type": "counter",
"delta": 100033330
},
{
"id": "t2",
"type": "gauge",
"value": 77777.1943
}
]
}
Response
- Send metrics
Post /update
Post /updates
{
"id": "t",
"type": "counter",
"delta": 100033330
}
Response
{
"id": "t",
"type": "counter",
"delta": 100033330,
"value": 0
}