Add Apache Monitoring
+ Added on Undercloud and Overcloud Controllers + Dashboards display Apache metrics Change-Id: Idb6ba467f671565671761eb9262ca69c49fdfcfd
This commit is contained in:
parent
1c57855ae6
commit
0261ba337b
@ -74,6 +74,16 @@ collectd_cephstorage: true
|
|||||||
collectd_compute: false
|
collectd_compute: false
|
||||||
|
|
||||||
# Collect plugins configuration:
|
# Collect plugins configuration:
|
||||||
|
########################
|
||||||
|
# Apache plugin
|
||||||
|
########################
|
||||||
|
# Undercloud
|
||||||
|
apache_undercloud_collectd_plugin: false
|
||||||
|
apache_undercloud_mod_status_port: 5001
|
||||||
|
# Overcloud Controller
|
||||||
|
apache_controller_collectd_plugin: false
|
||||||
|
apache_controller_mod_status_port: 5001
|
||||||
|
|
||||||
########################
|
########################
|
||||||
# Gnocchi backlog plugin
|
# Gnocchi backlog plugin
|
||||||
########################
|
########################
|
||||||
|
@ -12,8 +12,9 @@
|
|||||||
become: true
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- collectd
|
- collectd
|
||||||
- collectd-turbostat
|
- collectd-apache
|
||||||
- collectd-mysql
|
- collectd-mysql
|
||||||
|
- collectd-turbostat
|
||||||
|
|
||||||
# Get mysql's root password
|
# Get mysql's root password
|
||||||
- name: (Controllers Only) Get mysql root password
|
- name: (Controllers Only) Get mysql root password
|
||||||
@ -38,6 +39,35 @@
|
|||||||
with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}"
|
with_items: "{{overcloudrc_file.stdout_lines | default(omit)}}"
|
||||||
when: "(gnocchi_status_python_plugin == true) and (inventory_hostname == groups['controller'][0])"
|
when: "(gnocchi_status_python_plugin == true) and (inventory_hostname == groups['controller'][0])"
|
||||||
|
|
||||||
|
# Apache Monitoring
|
||||||
|
- name: Deploy Apache mod_status conf
|
||||||
|
template:
|
||||||
|
src: 00-browbeat_mod_status.conf.j2
|
||||||
|
dest: /etc/httpd/conf.d/00-browbeat_mod_status.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
become: true
|
||||||
|
when: "(('controller' in group_names and {{apache_controller_collectd_plugin}} == true) or ('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true))"
|
||||||
|
|
||||||
|
- name: (Undercloud Only) Allow httpd to listen to port ({{apache_undercloud_mod_status_port}})
|
||||||
|
shell: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_undercloud_mod_status_port}}"
|
||||||
|
become: true
|
||||||
|
when: "('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true)"
|
||||||
|
|
||||||
|
- name: (Controller Only) Allow httpd to listen to port ({{apache_controller_mod_status_port}})
|
||||||
|
shell: "/usr/sbin/semanage port -m -t http_port_t -p tcp {{apache_controller_mod_status_port}}"
|
||||||
|
become: true
|
||||||
|
when: "('controller' in group_names and {{apache_controller_collectd_plugin}} == true)"
|
||||||
|
|
||||||
|
- name: Restart Apache
|
||||||
|
service:
|
||||||
|
name: httpd
|
||||||
|
state: restarted
|
||||||
|
enabled: true
|
||||||
|
become: true
|
||||||
|
when: "(('controller' in group_names and {{apache_controller_collectd_plugin}} == true) or ('undercloud' in group_names and {{apache_undercloud_collectd_plugin}} == true))"
|
||||||
|
# End Apache Monitoring
|
||||||
|
|
||||||
- name: Reload systemd units
|
- name: Reload systemd units
|
||||||
command: systemctl daemon-reload
|
command: systemctl daemon-reload
|
||||||
become: true
|
become: true
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
# Installed by Browbeat Ansible Installer
|
||||||
|
|
||||||
|
{% if 'undercloud' in group_names %}
|
||||||
|
LoadModule status_module modules/mod_status.so
|
||||||
|
|
||||||
|
Listen {{apache_undercloud_mod_status_port}}
|
||||||
|
{% endif %}
|
||||||
|
{% if 'controller' in group_names %}
|
||||||
|
Listen {{apache_controller_mod_status_port}}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
ExtendedStatus on
|
||||||
|
{% if 'undercloud' in group_names %}
|
||||||
|
<VirtualHost *:{{apache_undercloud_mod_status_port}}>
|
||||||
|
{% endif %}
|
||||||
|
{% if 'controller' in group_names %}
|
||||||
|
<VirtualHost *:{{apache_controller_mod_status_port}}>
|
||||||
|
{% endif %}
|
||||||
|
<Location /mod_status>
|
||||||
|
SetHandler server-status
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.1
|
||||||
|
</Location>
|
||||||
|
</VirtualHost>
|
@ -16,6 +16,9 @@ LoadPlugin "logfile"
|
|||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
LoadPlugin write_graphite
|
LoadPlugin write_graphite
|
||||||
|
{% if apache_controller_collectd_plugin %}
|
||||||
|
LoadPlugin apache
|
||||||
|
{% endif %}
|
||||||
LoadPlugin cpu
|
LoadPlugin cpu
|
||||||
LoadPlugin conntrack
|
LoadPlugin conntrack
|
||||||
LoadPlugin df
|
LoadPlugin df
|
||||||
@ -76,6 +79,13 @@ PreCacheChain "PreCache"
|
|||||||
</Carbon>
|
</Carbon>
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
|
{% if apache_controller_collectd_plugin %}
|
||||||
|
<Plugin apache>
|
||||||
|
<Instance "status">
|
||||||
|
URL "http://127.0.0.1:{{apache_controller_mod_status_port}}/mod_status?auto"
|
||||||
|
</Instance>
|
||||||
|
</Plugin>
|
||||||
|
{% endif %}
|
||||||
<Plugin df>
|
<Plugin df>
|
||||||
ValuesPercentage true
|
ValuesPercentage true
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
@ -16,6 +16,9 @@ LoadPlugin "logfile"
|
|||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
LoadPlugin write_graphite
|
LoadPlugin write_graphite
|
||||||
|
{% if apache_undercloud_collectd_plugin %}
|
||||||
|
LoadPlugin apache
|
||||||
|
{% endif %}
|
||||||
LoadPlugin cpu
|
LoadPlugin cpu
|
||||||
LoadPlugin conntrack
|
LoadPlugin conntrack
|
||||||
LoadPlugin df
|
LoadPlugin df
|
||||||
@ -76,6 +79,13 @@ PreCacheChain "PreCache"
|
|||||||
</Carbon>
|
</Carbon>
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
|
{% if apache_undercloud_collectd_plugin %}
|
||||||
|
<Plugin apache>
|
||||||
|
<Instance "status">
|
||||||
|
URL "http://127.0.0.1:{{apache_undercloud_mod_status_port}}/mod_status?auto"
|
||||||
|
</Instance>
|
||||||
|
</Plugin>
|
||||||
|
{% endif %}
|
||||||
<Plugin df>
|
<Plugin df>
|
||||||
ValuesPercentage true
|
ValuesPercentage true
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{% set vars = {'panel_idx': 0, 'temp_count': 0} %}
|
{% set vars = {'panel_idx': 0, 'temp_count': 0} %}
|
||||||
{% set mariadb_groups = ['undercloud', 'controller', '*'] %}
|
|
||||||
{% set gnocchi_groups = ['controller', '*'] %}
|
{% set gnocchi_groups = ['controller', '*'] %}
|
||||||
|
{% set httpd_groups = ['undercloud', 'controller', '*'] %}
|
||||||
{% set ironic_groups = ['undercloud'] %}
|
{% set ironic_groups = ['undercloud'] %}
|
||||||
|
{% set mariadb_groups = ['undercloud', 'controller', '*'] %}
|
||||||
{
|
{
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"annotations": {
|
"annotations": {
|
||||||
@ -2594,6 +2595,290 @@
|
|||||||
},
|
},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{# End Loop over per-process options here #}
|
{# End Loop over per-process options here #}
|
||||||
|
{% if item.template_node_type in httpd_groups %}
|
||||||
|
{
|
||||||
|
"title": "Apache",
|
||||||
|
"height": "250px",
|
||||||
|
"editable": true,
|
||||||
|
"collapse": true,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"title": "Apache Bytes",
|
||||||
|
"error": false,
|
||||||
|
"span": 12,
|
||||||
|
"editable": true,
|
||||||
|
"type": "graph",
|
||||||
|
"isNew": true,
|
||||||
|
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
|
||||||
|
"id": {{vars.panel_idx}},
|
||||||
|
"datasource": null,
|
||||||
|
"renderer": "flot",
|
||||||
|
"x-axis": true,
|
||||||
|
"y-axis": true,
|
||||||
|
"y_formats": [
|
||||||
|
"bytes",
|
||||||
|
"short"
|
||||||
|
],
|
||||||
|
"grid": {
|
||||||
|
"leftLogBase": 1,
|
||||||
|
"leftMax": null,
|
||||||
|
"rightMax": null,
|
||||||
|
"leftMin": null,
|
||||||
|
"rightMin": null,
|
||||||
|
"rightLogBase": 1,
|
||||||
|
"threshold1": null,
|
||||||
|
"threshold2": null,
|
||||||
|
"threshold1Color": "rgba(216, 200, 27, 0.27)",
|
||||||
|
"threshold2Color": "rgba(234, 112, 112, 0.22)"
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"fill": 0,
|
||||||
|
"linewidth": 2,
|
||||||
|
"points": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"bars": false,
|
||||||
|
"stack": false,
|
||||||
|
"percentage": false,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"values": true,
|
||||||
|
"min": true,
|
||||||
|
"max": true,
|
||||||
|
"current": true,
|
||||||
|
"total": false,
|
||||||
|
"avg": false,
|
||||||
|
"alignAsTable": true,
|
||||||
|
"rightSide": true
|
||||||
|
},
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"steppedLine": false,
|
||||||
|
"tooltip": {
|
||||||
|
"value_type": "cumulative",
|
||||||
|
"shared": true
|
||||||
|
},
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"target": "aliasSub(aliasByNode($Cloud.$Node.apache-status.apache_bytes, 3), 'apache_', '')",
|
||||||
|
"textEditor": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliasColors": {},
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"links": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Apache Requests",
|
||||||
|
"error": false,
|
||||||
|
"span": 12,
|
||||||
|
"editable": true,
|
||||||
|
"type": "graph",
|
||||||
|
"isNew": true,
|
||||||
|
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
|
||||||
|
"id": {{vars.panel_idx}},
|
||||||
|
"datasource": null,
|
||||||
|
"renderer": "flot",
|
||||||
|
"x-axis": true,
|
||||||
|
"y-axis": true,
|
||||||
|
"y_formats": [
|
||||||
|
"ops",
|
||||||
|
"short"
|
||||||
|
],
|
||||||
|
"grid": {
|
||||||
|
"leftLogBase": 1,
|
||||||
|
"leftMax": null,
|
||||||
|
"rightMax": null,
|
||||||
|
"leftMin": null,
|
||||||
|
"rightMin": null,
|
||||||
|
"rightLogBase": 1,
|
||||||
|
"threshold1": null,
|
||||||
|
"threshold2": null,
|
||||||
|
"threshold1Color": "rgba(216, 200, 27, 0.27)",
|
||||||
|
"threshold2Color": "rgba(234, 112, 112, 0.22)"
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"fill": 0,
|
||||||
|
"linewidth": 2,
|
||||||
|
"points": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"bars": false,
|
||||||
|
"stack": false,
|
||||||
|
"percentage": false,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"values": true,
|
||||||
|
"min": true,
|
||||||
|
"max": true,
|
||||||
|
"current": true,
|
||||||
|
"total": false,
|
||||||
|
"avg": false,
|
||||||
|
"alignAsTable": true,
|
||||||
|
"rightSide": true
|
||||||
|
},
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"steppedLine": false,
|
||||||
|
"tooltip": {
|
||||||
|
"value_type": "cumulative",
|
||||||
|
"shared": true
|
||||||
|
},
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "C",
|
||||||
|
"target": "aliasSub(aliasByNode($Cloud.$Node.apache-status.apache_requests, 3), 'apache_', '')",
|
||||||
|
"textEditor": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliasColors": {},
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"links": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Apache Connections/Workers",
|
||||||
|
"error": false,
|
||||||
|
"span": 12,
|
||||||
|
"editable": true,
|
||||||
|
"type": "graph",
|
||||||
|
"isNew": true,
|
||||||
|
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
|
||||||
|
"id": {{vars.panel_idx}},
|
||||||
|
"datasource": null,
|
||||||
|
"renderer": "flot",
|
||||||
|
"x-axis": true,
|
||||||
|
"y-axis": true,
|
||||||
|
"y_formats": [
|
||||||
|
"short",
|
||||||
|
"short"
|
||||||
|
],
|
||||||
|
"grid": {
|
||||||
|
"leftLogBase": 1,
|
||||||
|
"leftMax": null,
|
||||||
|
"rightMax": null,
|
||||||
|
"leftMin": null,
|
||||||
|
"rightMin": null,
|
||||||
|
"rightLogBase": 1,
|
||||||
|
"threshold1": null,
|
||||||
|
"threshold2": null,
|
||||||
|
"threshold1Color": "rgba(216, 200, 27, 0.27)",
|
||||||
|
"threshold2Color": "rgba(234, 112, 112, 0.22)"
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"fill": 0,
|
||||||
|
"linewidth": 2,
|
||||||
|
"points": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"bars": false,
|
||||||
|
"stack": false,
|
||||||
|
"percentage": false,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"values": true,
|
||||||
|
"min": true,
|
||||||
|
"max": true,
|
||||||
|
"current": true,
|
||||||
|
"total": false,
|
||||||
|
"avg": false,
|
||||||
|
"alignAsTable": true,
|
||||||
|
"rightSide": true
|
||||||
|
},
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"steppedLine": false,
|
||||||
|
"tooltip": {
|
||||||
|
"value_type": "cumulative",
|
||||||
|
"shared": true
|
||||||
|
},
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"target": "aliasSub(aliasByNode($Cloud.$Node.apache-status.apache_connections, 3), 'apache_', '')",
|
||||||
|
"textEditor": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refId": "B",
|
||||||
|
"target": "aliasSub(aliasByNode($Cloud.$Node.apache-status.apache_idle_workers, 3), 'apache_', '')",
|
||||||
|
"textEditor": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliasColors": {},
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"links": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Apache Scoreboard",
|
||||||
|
"error": false,
|
||||||
|
"span": 12,
|
||||||
|
"editable": true,
|
||||||
|
"type": "graph",
|
||||||
|
"isNew": true,
|
||||||
|
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
|
||||||
|
"id": {{vars.panel_idx}},
|
||||||
|
"datasource": null,
|
||||||
|
"renderer": "flot",
|
||||||
|
"x-axis": true,
|
||||||
|
"y-axis": true,
|
||||||
|
"y_formats": [
|
||||||
|
"short",
|
||||||
|
"short"
|
||||||
|
],
|
||||||
|
"grid": {
|
||||||
|
"leftLogBase": 1,
|
||||||
|
"leftMax": null,
|
||||||
|
"rightMax": null,
|
||||||
|
"leftMin": null,
|
||||||
|
"rightMin": null,
|
||||||
|
"rightLogBase": 1,
|
||||||
|
"threshold1": null,
|
||||||
|
"threshold2": null,
|
||||||
|
"threshold1Color": "rgba(216, 200, 27, 0.27)",
|
||||||
|
"threshold2Color": "rgba(234, 112, 112, 0.22)"
|
||||||
|
},
|
||||||
|
"lines": true,
|
||||||
|
"fill": 1,
|
||||||
|
"linewidth": 2,
|
||||||
|
"points": false,
|
||||||
|
"pointradius": 5,
|
||||||
|
"bars": false,
|
||||||
|
"stack": true,
|
||||||
|
"percentage": false,
|
||||||
|
"legend": {
|
||||||
|
"show": true,
|
||||||
|
"values": true,
|
||||||
|
"min": true,
|
||||||
|
"max": true,
|
||||||
|
"current": true,
|
||||||
|
"total": false,
|
||||||
|
"avg": false,
|
||||||
|
"alignAsTable": true,
|
||||||
|
"rightSide": true
|
||||||
|
},
|
||||||
|
"nullPointMode": "connected",
|
||||||
|
"steppedLine": false,
|
||||||
|
"tooltip": {
|
||||||
|
"value_type": "individual",
|
||||||
|
"shared": true
|
||||||
|
},
|
||||||
|
"timeFrom": null,
|
||||||
|
"timeShift": null,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"refId": "A",
|
||||||
|
"target": "aliasSub(aliasByNode($Cloud.$Node.apache-status.apache_scoreboard-*, 3), 'apache_scoreboard-', '')",
|
||||||
|
"textEditor": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliasColors": {},
|
||||||
|
"seriesOverrides": [],
|
||||||
|
"links": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"showTitle": true
|
||||||
|
},
|
||||||
|
{% endif %}
|
||||||
{% if item.template_node_type in mariadb_groups %}
|
{% if item.template_node_type in mariadb_groups %}
|
||||||
{
|
{
|
||||||
"collapse": true,
|
"collapse": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user