Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics not being collected from jolokia endpoint #178

Open
viv816 opened this issue Dec 19, 2017 · 1 comment
Open

Metrics not being collected from jolokia endpoint #178

viv816 opened this issue Dec 19, 2017 · 1 comment

Comments

@viv816
Copy link

viv816 commented Dec 19, 2017

Hi,

I have created a test project on an Openshift cluster (1 master, 1 infra, 2 nodes).

Then pulled and deployed latest "hawkular/hawkular-openshift-agent" image to my project and config map 'hosa-config.yaml' as environment variable.

I also deployed a docker image of a spring boot application containing camel routes with jolokia enabled and config map 'app-config.yaml' as environment variable.

However, the 'hawkular-openshift-agent' pod does not seem to collect metrics from my spring boot application. Log details shown below.

hosa

Did I miss any step or configuration? I am new to openshift. I tried the instructions mentioned in the readme file, but got same logs. Please help.

(Btw, the spring boot application logs show everything is fine and all camel routes are started and all metrics endpoints are mapped and jolokia listening on 8080.)

Thank you,

hosa-config.yaml

kind: ConfigMap
apiVersion: v1
name: Hawkular OpenShift Agent Configuration
metadata:
name: hawkular-openshift-agent-configuration
labels:
metrics-infra: agent
data:
config.yaml: |
collector:
minimum_collection_interval_secs: 10
metric_id_prefix: pod/${POD:uid}/custom/
tags:
metric_name: ${METRIC:name}
description: ${METRIC:description}
units: ${METRIC:units}
namespace_id: ${POD:namespace_uid}
namespace_name: ${POD:namespace_name}
node_name: ${POD:node_name}
pod_id: ${POD:uid}
pod_ip: ${POD:ip}
pod_name: ${POD:name}
pod_namespace: ${POD:namespace_name}
hostname: ${POD:hostname}
host_ip: ${POD:host_ip}
labels: ${POD:labels}
type: pod
collector: hawkular_openshift_agent
custom_metric: true

app-config.yaml
kind: ConfigMap
apiVersion: v1
metadata:
name: app-metrics-config
data:
hawkular-openshift-agent-configuration: |
endpoints:
- type: jolokia
protocol: "http"
port: 8080
path: /jolokia
collection_interval: 30s
metrics:
- name: java.lang:type=Threading#ThreadCount
type: counter
id: VM Thread Count
- name: java.lang:type=Memory#HeapMemoryUsage#used
type: gauge
id: VM Heap Memory Used

@rahnarsson
Copy link

Make sure you have ConfigMap as volume on your springboot application and the volume name must be hawkular-openshift-agent where you specify the metrics to be collected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants