https://github.com/klaxxon/goverseer
Go Overseer - A simple, flexible go based https server for providing a simple metric monitoring server.
https://github.com/klaxxon/goverseer
chart gauge go golang metrics monitoring web
Last synced: 9 months ago
JSON representation
Go Overseer - A simple, flexible go based https server for providing a simple metric monitoring server.
- Host: GitHub
- URL: https://github.com/klaxxon/goverseer
- Owner: klaxxon
- Created: 2019-06-29T02:21:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T10:51:18.000Z (over 6 years ago)
- Last Synced: 2025-02-03T09:44:25.021Z (over 1 year ago)
- Topics: chart, gauge, go, golang, metrics, monitoring, web
- Language: Go
- Size: 179 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOverseer - Go Overseer 
This is a simple HTTPS web server that provides a dynamic webpage that can be used to display any metrics, in a variety of ways. The objective was to be able to throw simple JSON objects containing metrics like load, disk space, bandwidth, process running, etc. to a lightweight server, and be able to display the results in a flexible format.
## Functional:
The server listens for webserver requests to provide the base web page, websocket connections from the javascript routine on the webpage, to provide real-time updates, and http metric pushes from clients.
## Sending Data
Just send json to /metric URL of the server.
```
{
"apikey":"",
"metrics":[
{"host":"DevMonitor",
"metric":"cpu_user",
"value":"9",
"interval":15},
{"host":"DevMonitor",
"metric":"cpu_sys",
"value":"3",
"interval":15
}
]
}
```
The apikey is just an optional string to prevent others from posting to your server, if configured.
The metrics is an array of one or more metric objects.
At a minimum, the metric object must have a host, metric and value.
The optional interval is used by the server to timeout the values, if desired.
## Monitor page:
Tags within the monitor page can be host/metric specific or metric generic. A generic metric works only with appending text areas, otherwise, a gauge or single text field will overwrite as each host reports it's metric. These are handled below with templates.
### Very specific
To show the cpu_idle metric from the "Development" host as a text field, gauge and chart:
```
Specific host/metric as text
```
### Templating
Templating allows you to define a look for dynamic entries, for example, as new hosts report in, the template is cloned for the specific metric for the new host. Put an ID onto the template so the app can track instantiations.
In this case, a new instance of "varietyTest" will be created for each host responding with a cpu_user metric. This will consist of text, gauge and chart.
```
```
## Setup:
Clone project into your go/src folder.
Within the project folder, generate your self signed server keys:
### Private key
```
openssl genrsa -out server.key 2048
openssl ecparam -genkey -name secp384r1 -out server.key
```
### Certificate
```
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650
```
```
$> go run goverseer.go
```
Access the page at:
```
https://localhost:44444
```