@skip_if_containerized_server
@skip_if_github_validation
@scope_monitoring
Feature: 0028 - Disable and re-enable monitoring of the server
File name: srv_monitoring.feature
Relative path: secondary/srv_monitoring.feature
@skip_if_containerized_server
@skip_if_github_validation
@scope_monitoring
Scenario: Disable monitoring from the UI
When
I follow the left menu "Admin > Manager Configuration > Monitoring"
0s
And
I wait until I see "Server self monitoring" text
0s
And
I click on "Disable"
0s
And
I wait until button "Disable" becomes enabled
0s
Then
I should see a "Monitoring disabled successfully." text
0s
And
I should see a list item with text "System" and a failing bullet
0s
And
I should see a list item with text "PostgreSQL database" and a failing bullet
0s
And
I should see a list item with text "Server self monitoring" and a warning bullet
0s
And
I should see a list item with text "Taskomatic (Java JMX)" and a warning bullet
0s
And
I should see a list item with text "Tomcat (Java JMX)" and a warning bullet
0s
And
I should see a "Restarting Tomcat and Taskomatic is needed for the configuration changes to take effect." text
0s
@skip_if_containerized_server
@skip_if_github_validation
@scope_monitoring
Scenario: Check that monitoring is disabled
Given
I am authorized for the "Admin" section
0s
When
I follow the left menu "Admin > Manager Configuration > Monitoring"
0s
And
I wait until I see "Server self monitoring" text
0s
Then
I should see a "Enable" button
0s
And
I should see a "Disable" button
0s
And
I should see a list item with text "System" and a failing bullet
0s
And
I should see a list item with text "PostgreSQL database" and a failing bullet
0s
And
I should see a list item with text "Server self monitoring" and a failing bullet
0s
And
I should see a list item with text "Taskomatic (Java JMX)" and a failing bullet
0s
And
I should see a list item with text "Tomcat (Java JMX)" and a failing bullet
0s
And
I should not see a "Restarting Tomcat and Taskomatic is needed for the configuration changes to take effect." text
0s
And
file "/etc/rhn/rhn.conf" should contain "prometheus_monitoring_enabled = 0" on server
0s
And
file "/etc/tomcat/conf.d/tomcat_jmx.conf" should not exist on server
0s
And
file "/etc/rhn/taskomatic.conf.d/taskomatic_jmx.conf" should not exist on server
0s
And
port "3333" should be closed
0s
And
port "3334" should be closed
0s
And
port "5556" should be closed
0s
And
port "5557" should be closed
0s
@skip_if_containerized_server
@skip_if_github_validation
@scope_monitoring
Scenario: Enable monitoring from the UI
When
I follow the left menu "Admin > Manager Configuration > Monitoring"
0s
And
I wait until I see "Server self monitoring" text
0s
And
I click on "Enable"
0s
And
I wait until button "Enable" becomes enabled
0s
Then
I should see a "Monitoring enabled successfully." text
0s
And
I should see a list item with text "System" and a success bullet
0s
And
I should see a list item with text "PostgreSQL database" and a success bullet
0s
And
I should see a list item with text "Server self monitoring" and a pending bullet
0s
And
I should see a list item with text "Taskomatic (Java JMX)" and a pending bullet
0s
And
I should see a list item with text "Tomcat (Java JMX)" and a pending bullet
0s
And
I should see a "Restarting Tomcat and Taskomatic is needed for the configuration changes to take effect." text
0s
@skip_if_containerized_server
@skip_if_github_validation
@scope_monitoring
Scenario: Check that monitoring is enabled
Given
I am authorized for the "Admin" section
0s
When
I follow the left menu "Admin > Manager Configuration > Monitoring"
0s
And
I wait until I see "Server self monitoring" text
0s
Then
I should see a "Enable" button
0s
And
I should see a "Disable" button
0s
And
I should see a list item with text "System" and a success bullet
0s
And
I should see a list item with text "PostgreSQL database" and a success bullet
0s
And
I should see a list item with text "Server self monitoring" and a success bullet
0s
And
I should see a list item with text "Taskomatic (Java JMX)" and a success bullet
0s
And
I should see a list item with text "Tomcat (Java JMX)" and a success bullet
0s
And
I should not see a "Restarting Tomcat and Taskomatic is needed for the configuration changes to take effect." text
0s
And
file "/etc/rhn/rhn.conf" should contain "prometheus_monitoring_enabled = 1" on server
0s
And
file "/etc/tomcat/conf.d/tomcat_jmx.conf" should contain "jmx_prometheus_javaagent.jar=5556" on server
0s
And
file "/etc/rhn/taskomatic.conf.d/taskomatic_jmx.conf" should contain "jmx_prometheus_javaagent.jar=5557" on server
0s
And
port "3333" should be closed
0s
And
port "3334" should be closed
0s
And
port "5556" should be open
0s
And
port "5557" should be open
0s