Skip to content

Instantly share code, notes, and snippets.

@garethahealy
Last active December 11, 2016 13:35
Show Gist options
  • Save garethahealy/d06cc00166b4f2bde1ea5550326728e7 to your computer and use it in GitHub Desktop.
Save garethahealy/d06cc00166b4f2bde1ea5550326728e7 to your computer and use it in GitHub Desktop.
hawkular agent with etcd
# Create the secrets and add to the pod
oc project openshift-infra
oc secrets new etcd-client-crt master.etcd-client.crt
oc secrets new etcd-client-key master.etcd-client.key
oc secrets add serviceaccount/hawkular-agent secret/etcd-client-crt --for=mount
oc secrets add serviceaccount/hawkular-agent secret/etcd-client-key --for=mount
oc volume rc/hawkular-openshift-agent --add --name=etcd-client-crt --type=secret --secret-name=etcd-client-crt --mount-path=/etcd-client-crt
oc volume rc/hawkular-openshift-agent --add --name=etcd-client-key --type=secret --secret-name=etcd-client-key --mount-path=/etcd-client-key
# RSH into the pod and check cURL works
curl https://10.2.2.2:4001/metrics --cert /etcd-client-crt/master.etcd-client.crt --key /etcd-client-key/master.etcd-client.key
# Update the agent config
data:
config.yaml: |
endpoints:
- type: "prometheus"
url: "https://10.2.2.2:4001/metrics"
collection_interval_secs: 5
metrics:
- name: etcd_store_expires_total
type: counter
identity:
cert_file: /etcd-client-crt/master.etcd-client.crt
private_key_file: /etcd-client-key/master.etcd-client.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment