mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
feature: Configured prometheus, improve readme (#31)
This commit is contained in:
@ -7,3 +7,6 @@ core:
|
||||
tracing:
|
||||
rabbitMQEnabled: true
|
||||
rabbitMQURI: "amqp://integration:integration@localhost:5672/"
|
||||
prometheus:
|
||||
path: "/metrics"
|
||||
port: ":2112"
|
@ -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())
|
||||
|
Reference in New Issue
Block a user