feature: Configured prometheus, improve readme (#31)

This commit is contained in:
Mario Candela
2023-03-31 20:03:42 +02:00
committed by GitHub
parent 5a70e5c900
commit f50f5185df
12 changed files with 584 additions and 37 deletions

View File

@ -7,3 +7,6 @@ core:
tracing:
rabbitMQEnabled: true
rabbitMQURI: "amqp://integration:integration@localhost:5672/"
prometheus:
path: "/metrics"
port: ":2112"

View File

@ -20,6 +20,7 @@ import (
type IntegrationTestSuite struct {
suite.Suite
beelzebubBuilder *builder.Builder
prometheusHost string
httpHoneypotHost string
tcpHoneypotHost string
sshHoneypotHost string
@ -38,6 +39,7 @@ func (suite *IntegrationTestSuite) SetupSuite() {
suite.httpHoneypotHost = "http://localhost:8080"
suite.tcpHoneypotHost = "localhost:3306"
suite.sshHoneypotHost = "localhost"
suite.prometheusHost = "http://localhost:2112/metrics"
beelzebubConfigPath := "./configurations/beelzebub.yaml"
servicesConfigDirectory := "./configurations/services/"
@ -143,6 +145,18 @@ func (suite *IntegrationTestSuite) TestRabbitMQ() {
}
}
func (suite *IntegrationTestSuite) TestPrometheus() {
//Invoke HTTP Honeypot
response, err := resty.New().R().Get(suite.httpHoneypotHost + "/index.php")
suite.Require().NoError(err)
suite.Equal(http.StatusOK, response.StatusCode())
response, err = resty.New().R().Get(suite.prometheusHost)
suite.Require().NoError(err)
suite.Equal(http.StatusOK, response.StatusCode())
}
func (suite *IntegrationTestSuite) TestShutdownBeelzebub() {
suite.Require().NoError(suite.beelzebubBuilder.Close())