9f1938fde6
Add language definition to the code blocks
2020-11-18 10:05:29 +01:00
e5b45d0bbf
Add missing quote inside the config.toml example
2020-11-18 10:04:42 +01:00
a0e36d4701
Merge branch 'replace-assert-with-require' into master
...
* replace-assert-with-require:
Replace all occurrences from assert with require
2020-11-17 17:28:58 +01:00
20ede605fb
Replace all occurrences from assert with require
...
The package testify offers assert and require for testing.
The difference between assert and require are is that on require
the test will immediately fail.
2020-11-17 17:23:54 +01:00
0ef909f7ae
Merge branch 'logging' into master
...
* logging:
Add some more logging to the main, stats and alert package
Extract config and rule file loading to own fuction
Move the monitoring functions to an own struct
Move transformation of rules T array to Analyser interface func
Add init logging to the main function giving it the args configuration
Implement logrus to log the main package
Remove not longer needed debug logging
2020-11-17 17:19:02 +01:00
5d36d67768
Add some more logging to the main, stats and alert package
2020-11-17 17:16:21 +01:00
ac2f6b5957
Extract config and rule file loading to own fuction
...
Reduce the code inside the main function and improve the readablity.
2020-11-17 16:14:03 +01:00
62af80caf1
Move the monitoring functions to an own struct
...
This step was done to reduce the standalone functions insde the
main package.
2020-11-17 16:00:15 +01:00
bf8304f02c
Move transformation of rules T array to Analyser interface func
...
Go does not allow the usage of an interface on a typed array. To
resolve this issue we manually create a new array with the interface type
and add all items to it. This no happens inside the rules sturct
instead of being a single standalone function inside the main package.
2020-11-17 15:05:33 +01:00
b0756879c3
Add init logging to the main function giving it the args configuration
2020-11-17 13:30:47 +01:00
fa1f9ba1b7
Implement logrus to log the main package
...
It adds cli options to set the logging level and the output format.
2020-11-16 23:29:32 +01:00
0a1cb81dbb
Remove not longer needed debug logging
2020-11-16 23:29:26 +01:00
12a80fc85e
Merge branch 'auto-deployment' into master
...
* auto-deployment:
Change deployment trigger to promote
Change ssh to use the custom gmon deployment script
Add ssh deployment config
2020-11-16 17:59:44 +01:00
e5c1bbe645
Change deployment trigger to promote
...
This change will make it to a semi automatic deployment. To trigger
the promotion you have to use the drone UI or the cli tool.
See -> https://docs.drone.io/promote/
2020-11-16 17:49:41 +01:00
9af89dc33f
Change ssh to use the custom gmon deployment script
2020-11-16 17:48:17 +01:00
806b4482cd
Add ssh deployment config
2020-11-16 17:14:05 +01:00
7efd0856c4
Merge branch 'docker' into master
...
* docker:
Add docker building and pushing pipeline
Add docker setup to build a gmon image
2020-11-16 14:00:19 +01:00
6d3718b12e
Add docker building and pushing pipeline
2020-11-16 13:57:55 +01:00
fe4e95d43d
Add docker setup to build a gmon image
2020-11-16 13:57:25 +01:00
2d27b6aa17
Merge pull request #20 from hamburghammer/develop
...
Implements a client to get data, to analyse them and to send notification if needed
2020-11-14 19:36:23 +01:00
b9d43c898d
Merge pull request #19 from hamburghammer/core/analyse
...
Implementation of the analyses of the data with notification
2020-11-14 19:32:35 +01:00
Augusto Dwenger
183975047f
Fix RAM analyse result string messge having wrong content
...
Adding tests showed that there was an error regarding the result
messages.
2020-11-14 19:21:37 +01:00
Augusto Dwenger
9a92147e3f
Add basic test for the disk rule analyser
2020-11-14 19:20:43 +01:00
Augusto Dwenger
c2c7b49334
Fix toml test with wrong fild name for the interval option
2020-11-14 18:44:30 +01:00
Augusto Dwenger
052e8f64cc
Add check if the rule is active
2020-11-14 18:41:37 +01:00
Augusto Dwenger
467428623d
Add rule and config file documentation to the README.md
2020-11-12 14:46:10 +01:00
Augusto Dwenger
af1f189c7b
Implement ram rules
2020-11-12 14:27:36 +01:00
Augusto Dwenger
546f2bc385
Add small documentation to the analyse types
2020-11-12 14:27:36 +01:00
Augusto Dwenger
b46c001c01
Implement disk rules
2020-11-12 14:27:29 +01:00
Augusto Dwenger
b38829caf5
Implement configuration from config files
...
Adds the ability to specify the location of the configuration files
through parameters. It loads the files and configures the clients
and sets the rules for the analysation.
2020-11-11 16:16:04 +01:00
Augusto Dwenger
1c2588f686
Add gmon config files to ignore
2020-11-11 16:15:17 +01:00
Augusto Dwenger
35d7af2a73
Add .vscode to the ignore list
2020-11-10 17:21:56 +01:00
Augusto Dwenger
6d93943bf3
Add rate configuration
...
Ability to configure time between pulling for data.
2020-11-10 16:59:48 +01:00
Augusto Dwenger
138a4f339a
Add cpu rule toml parsing
2020-11-10 14:12:29 +01:00
Augusto Dwenger
968bed2c84
Rename config loading parts
...
This is to have no naming conflicts introducing rule loading.
2020-11-10 12:41:50 +01:00
Augusto Dwenger
7b36460c4c
Update toml loader
...
Refactored the tests.
2020-11-10 12:08:18 +01:00
Augusto Dwenger
0294b548cb
Implement cpu rule analyser
2020-11-10 11:28:59 +01:00
Augusto Dwenger
7c061f0a7e
Small prototype to connect both services
...
It takes one entry from gsave and posts it to gotify.
2020-11-09 10:04:36 +01:00
Augusto Dwenger
64ea75c84d
Pin gsave version to specific commit hash
2020-11-09 10:04:36 +01:00
Augusto Dwenger
22af82c7b9
Update the simple client to work gsave
...
Implements all field from gsave with the correct type.
2020-11-09 10:04:36 +01:00
Augusto Dwenger
274772eaab
Update the simple client to work gsave
...
Implements all field from gsave with the correct type.
2020-11-06 09:46:21 +01:00
Augusto Dwenger
9839dd67dc
Add docker-compose dev environment
2020-11-05 15:42:54 +01:00
65091ccc8f
Merge pull request #18 from hamburghammer/alert
...
Alert module with a simple client for Gotify
2020-11-05 14:41:43 +01:00
Augusto Dwenger
564982751e
Rename SimpleClient to GotifyClient to be more descriptive
2020-11-05 14:40:45 +01:00
Augusto Dwenger
4f85a2ba79
Fix notify not being able to send correct notifications
...
Fix json field naming
Fix priority type -> int (gotify expects it to be an int)
Fix Notify implementation to match the Notifier interface
Remove hardcoded token and url
2020-11-05 14:40:45 +01:00
Augusto Dwenger
8f17807c21
Remove interface postfix from Notifier interface
...
Add missing type documentation
2020-11-05 14:40:33 +01:00
Augusto Dwenger
268d3acfa1
Fix test for testing the url parsing
2020-11-05 13:43:00 +01:00
Marius
3108e90489
working tests
2020-11-02 15:43:36 +01:00
Marius
d6bb91974b
[WIP] failing tests, but why?
2020-11-02 15:41:02 +01:00
Marius
2e390daf35
inital alert commit with httpClient and request to gotify
2020-11-02 15:06:26 +01:00