Skip to content

Instantly share code, notes, and snippets.

@vnugent
Last active March 22, 2017 14:44
Show Gist options
  • Save vnugent/0b1fb80c14d4c95ddf527318a57fdb80 to your computer and use it in GitHub Desktop.
Save vnugent/0b1fb80c14d4c95ddf527318a57fdb80 to your computer and use it in GitHub Desktop.
HOSA test 1

Environment:

  • 1 VM 8GB RAM, 1 master, 1 node on the same VM. Installed from released binary
  • RH Public OS1
  • Origin version: 1.4.1
  • HOSA version: Unknown

Master: http://master.cloud1.hawkular.org

Test tools:

  • simple node.js app with a prometheus endpoint
  • Deploy app as a pod in OpenShift and scale up up as needed
  • can change metric types and number of metrics
  • Python app using Hawkular metrics Python client to query metric definitions and data

Test 1A

  1. In OpenShift deploy promgen (1 pod) and set up HOSA to sample every 30s.
  2. Use pyme to verify metrics definitions and number of raw data points.

promgen /metrics endpoint

# HELP counterA counterA help message
# TYPE counterA counter
counterA 1530
# HELP gaugeA gaugeA help message
# TYPE gaugeA gauge
gaugeA 77

Expected:

  • counterA metric definition
  • gaugeA metric definition
  • 1 pod
  • data points for 30-minute duration: 2 samples/minute * 30 minutes = 60

pyme output

  • start time = now - 35 minutes
  • end time = now - 5 minutes
Number of pods: 1
{
    "promgen/example-5-2r548": {
        "metrics": [
            {
                "type": "gauge", 
                "id": "e1bda985-0a0f-11e7-972b-fa163e4fa2fc_custom_gaugeA", 
                "data_count": 60
            }, 
            {
                "type": "counter", 
                "id": "e1bda985-0a0f-11e7-972b-fa163e4fa2fc_custom_counterA", 
                "data_count": 60
            }
        ]
    }
}

Test 1B

Same 1A but increase the number of pods to 10. Each pod should still have 60 samples but now we have 10 pods.

pyme output

  • 10 pods
  • 2 metrics/pod
  • each metric has 60 samples in 30 minute duration

Test 1C

Same as 1A but increase the number od pods to 20 pyme output

  • 20 pods
  • 2 metrics/pod
  • 60 sample per 30 minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment