Permalink
Browse files

Adding OpenDaylight Monitoring

This commit does the following:

1. Install collectd-java RPMS
2. Collectd Configuration for GenericJMX
3. Adds separate OpenDaylight Row to general system dashboards
4. Adds heap and non-heap memory usage panels

In a later commit, I would like to add panels for the other metrics.

Change-Id: I95a220bc792145e5c23e745bfdceb1dc25b77692
  • Loading branch information...
smalleni committed Aug 23, 2017
1 parent 5b45ce3 commit dd744c3c31a04ccb20319b81ff786dc721b98c43
@@ -266,6 +266,15 @@ regex_warn: false
regex_info: false
############################
# OpenDaylight JAVA Plugin
###########################
# Plugin assumes that JAVA is already installed on the host
opendaylight_java_plugin: false
karaf_user: karaf
karaf_password: karaf
########################################
# Docker related
# (use these if deploying graphite/carbon/grafana as containers)
@@ -129,6 +129,16 @@ controller_monitored_queues:
swift_stat_controller_collectd_plugin: false
swift_stat_controller_collectd_interval: 10
############################
# OpenDaylight JAVA Plugin
###########################
# Plugin assumes that JAVA is already installed on the host
opendaylight_java_plugin: false
karaf_user: karaf
karaf_password: karaf
########################
# tail plugin
########################
@@ -31,6 +31,17 @@
- collectd-mysql
- collectd-turbostat
# (sai) Separating out collectd java rpms as they have a lot of dependencies and
# are only required for ODL monitoring on controllers only
- name: Install collectd java specific rpms
yum:
name: "{{ item }}"
state: present
with_items:
- collectd-java
- collectd-generic-jmx
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)
# Iostat plugin requires sysstat since shelling iostat for stats, Also it is
# handy to have sysstat.
# (akrzos) Ignore errors on install since we attempt to install without
@@ -273,6 +284,15 @@
mode: 0644
become: true
# OpenDaylight Monitoring
- name: Symlink libjvm
file:
src: /usr/lib/jvm/jre/lib/amd64/server/libjvm.so
dest: /usr/lib64/libjvm.so
state: link
become: true
when: ('controller' in group_names and {{opendaylight_java_plugin}} == true)
#
# Configure selinux bits
#
@@ -51,6 +51,10 @@ LoadPlugin tail
LoadPlugin turbostat
LoadPlugin unixsock
LoadPlugin uptime
{% if opendaylight_java_plugin %}
LoadPlugin java
{% endif %}
# Open unix domain socket for collectdctl
<Plugin unixsock>
@@ -1803,5 +1807,96 @@ PreCacheChain "PreCache"
</Plugin>
{% if opendaylight_java_plugin %}
<Plugin "java">
JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"
LoadPlugin "org.collectd.java.GenericJMX"
<Plugin "GenericJMX">
<MBean "gc-count">
ObjectName "java.lang:type=GarbageCollector,*"
InstancePrefix "gc-"
InstanceFrom "name"
<Value>
Type "derive"
Table false
Attribute "CollectionCount"
InstancePrefix "count"
</Value>
</MBean>
<MBean "gc-time">
ObjectName "java.lang:type=GarbageCollector,*"
InstancePrefix "gc-"
InstanceFrom "name"
<Value>
Type "derive"
Table false
Attribute "CollectionTime"
InstancePrefix "time"
</Value>
</MBean>
<MBean "memory_pool">
ObjectName "java.lang:type=MemoryPool,*"
InstancePrefix "memory_pool-"
InstanceFrom "name"
<Value>
Type "memory"
Table true
Attribute "Usage"
</Value>
</MBean>
<MBean "memory-heap">
ObjectName "java.lang:type=Memory"
InstancePrefix "memory-heap"
<Value>
Type "memory"
Table true
Attribute "HeapMemoryUsage"
</Value>
</MBean>
<MBean "memory-nonheap">
ObjectName "java.lang:type=Memory"
InstancePrefix "memory-nonheap"
<Value>
Type "memory"
Table true
Attribute "NonHeapMemoryUsage"
</Value>
</MBean>
<MBean "thread">
ObjectName "java.lang:type=Threading"
InstancePrefix "threading"
<Value>
Type "gauge"
Table false
Attribute "ThreadCount"
InstancePrefix "count"
</Value>
</MBean>
<MBean "thread-daemon">
ObjectName "java.lang:type=Threading"
InstancePrefix "threading"
<Value>
Type "gauge"
Table false
Attribute "DaemonThreadCount"
InstancePrefix "count-daemon"
</Value>
</MBean>
<Connection>
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root"
Collect "memory_pool"
Collect "memory-heap"
Collect "memory-nonheap"
Collect "gc-count"
Collect "gc-time"
Collect "thread"
Collect "thread-daemon"
User "{{karaf_user}}"
Password "{{karaf_password}}"
</Connection>
</Plugin>
</Plugin>
{% endif %}
# Include other collectd configuration files
Include "/etc/collectd.d"
@@ -6,6 +6,8 @@
{% set mariadb_groups = ['undercloud', 'controller', '*'] %}
{% set rabbitmq_groups = ['undercloud', 'controller', '*'] %}
{% set swift_stat_groups = ['controller', '*'] %}
{% set odl_groups = ['controller', '*'] %}
{
"dashboard": {
"annotations": {
@@ -8894,6 +8896,170 @@
"title": "Ironic StatsD API power/provision state"
},
{% endif %}
{% if item.template_node_type in odl_groups %}
{
"collapse": true,
"height": "200px",
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
"id": {{vars.panel_idx}},
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"target": "aliasByNode($Cloud.$Node.GenericJMX-memory-heap.*, 3)"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "ODL Java Heap Memory",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bits",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fill": 1,
{% if vars.update({'panel_idx': (vars.panel_idx + 1)}) %} {% endif %}
"id": {{vars.panel_idx}},
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"refId": "A",
"target": "aliasByNode($Cloud.$Node.GenericJMX-memory-nonheap.*, 3)"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "ODL Java Non-Heap Memory",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bits",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"repeat": null,
"repeatIteration": null,
"repeatRowId": null,
"showTitle": true,
"title": "OpenDaylight",
"titleSize": "h6"
},
{% endif %}
{
"collapse": true,
"editable": true,

0 comments on commit dd744c3

Please sign in to comment.