-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
This patch add ability to listen for metric data messages from Ceilometer and prepare them for PRometheus scraping.
- added missing support for AMQP1Connections to main loop for metrics - unify shared logic with main loop for events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passes CI now. Thanks!
@@ -21,11 +21,11 @@ before_install: | |||
- docker run -p 9200:9200 --name elastic -p 9300:9300 -e "discovery.type=single-node" -d docker.elastic.co/elasticsearch/elasticsearch:$ELASTIC_VERSION | |||
- docker pull quay.io/interconnectedcloud/qdrouterd:$QDROUTERD_VERSION | |||
- docker run -p 5672:5672 -d quay.io/interconnectedcloud/qdrouterd:$QDROUTERD_VERSION | |||
- docker pull centos:7 | |||
- docker pull centos:8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go!
yum remove -y git* | ||
yum install -y git216-all | ||
yum install -y golang qpid-proton-c-devel iproute | ||
# below is not available currently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these just be removed, or a note added explaining when they would be uncommented?
@@ -197,11 +191,10 @@ func (cs *CacheServer) Put(incomingData incoming.MetricDataFormat) { | |||
case buffer = <-freeList: | |||
//go one from buffer | |||
default: | |||
buffer = new(IncomingBuffer) | |||
buffer = &IncomingBuffer{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my education, is there a reason other than style to prefer this version?
if dataInterface.ISNew() { | ||
dataInterface.SetNew(false) | ||
for index := range dataInterface.GetValues() { | ||
m, err := tsdb.NewPrometheusMetric(usetimestamp, dataInterface.GetDataSourceName(), dataInterface, index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} | ||
|
||
//GetInterval ... | ||
//GetInterval returns hardcoded defaultCeilometerInterval, because Ceilometer metricDesc | ||
//does not contain interval information (are not periodically sent at all) and any reasonable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks for making this explicit in the comments!
//MetricHandlerHTML contains HTML for default endpoint | ||
const MetricHandlerHTML = ` | ||
<html> | ||
<head><title>Collectd Exporter</title></head> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should s/Collectd/Metrics/
in this block, or have it actually driven by the datasource name
@@ -119,7 +123,7 @@ func TestCollectdIncoming(t *testing.T) { | |||
assert.Contains(t, labels, sample.Plugin) | |||
assert.Contains(t, labels, "instance") | |||
// test GetMetricDesc behaviour | |||
metricDesc := "Service Assurance exporter: 'pluginname' Type: 'collectd' Dstype: 'gauge' Dsname: 'value1'" | |||
metricDesc := "Service Telemetry exporter: 'pluginname' Type: 'collectd' Dstype: 'gauge' Dsname: 'value1'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😄 Deep cleaning
This PR makes SG to understand Ceilometer metrics