{"action":"created","issue":{"url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/71","repository_url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent","labels_url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/71/comments","events_url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/71/events","html_url":"https://github.com/hawkular/hawkular-openshift-agent/issues/71","id":196945348,"number":71,"title":"hawkular-openshift-agent cannot collect jolokia metrics in https: missing identity","user":{"login":"akram","id":654449,"avatar_url":"https://avatars.githubusercontent.com/u/654449?v=3","gravatar_id":"","url":"https://api.github.com/users/akram","html_url":"https://github.com/akram","followers_url":"https://api.github.com/users/akram/followers","following_url":"https://api.github.com/users/akram/following{/other_user}","gists_url":"https://api.github.com/users/akram/gists{/gist_id}","starred_url":"https://api.github.com/users/akram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akram/subscriptions","organizations_url":"https://api.github.com/users/akram/orgs","repos_url":"https://api.github.com/users/akram/repos","events_url":"https://api.github.com/users/akram/events{/privacy}","received_events_url":"https://api.github.com/users/akram/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-21T14:26:17Z","updated_at":"2016-12-21T15:42:22Z","closed_at":null,"body":"I am deploying h-o-a with a DaemonSet in OpenShift with the following configuration:\r\n\r\n```\r\napiVersion: extensions/v1beta1\r\nkind: DaemonSet\r\nmetadata:\r\n  name: hawkular-openshift-agent\r\nspec:\r\n  selector:\r\n    matchLabels:\r\n      name: hawkular-openshift-agent\r\n  template:\r\n    metadata:\r\n      labels:\r\n        name: hawkular-openshift-agent\r\n    spec:\r\n      containers:\r\n      - command:\r\n        - /opt/hawkular/hawkular-openshift-agent\r\n        - -config\r\n        - /hawkular-openshift-agent-configuration/config.yaml\r\n        - -v\r\n        - \"4\"\r\n        env:\r\n#        - name: HAWKULAR_OPENSHIFT_AGENT_CERT_FILE\r\n#          value: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\r\n        - name: K8S_POD_NAMESPACE\r\n          valueFrom:\r\n            fieldRef:\r\n              apiVersion: v1\r\n              fieldPath: metadata.namespace\r\n        - name: K8S_POD_NAME\r\n          valueFrom:\r\n            fieldRef:\r\n              apiVersion: v1\r\n              fieldPath: metadata.name\r\n        - name: HAWKULAR_SERVER_URL\r\n          value: https://hawkular-metrics\r\n        - name: HAWKULAR_SERVER_CA_CERT_FILE\r\n          value: /hawkular-metrics-certificate/hawkular-metrics-ca.certificate\r\n        - name: HAWKULAR_SERVER_USERNAME\r\n          valueFrom:\r\n            secretKeyRef:\r\n              key: hawkular-metrics.username\r\n              name: hawkular-metrics-account\r\n        - name: HAWKULAR_SERVER_PASSWORD\r\n          valueFrom:\r\n            secretKeyRef:\r\n              key: hawkular-metrics.password\r\n              name: hawkular-metrics-account\r\n        image: hawkular/hawkular-openshift-agent:latest\r\n        imagePullPolicy: Always\r\n        name: hawkular-openshift-agent\r\n        resources: {}\r\n        securityContext:\r\n          capabilities:\r\n            drop:\r\n            - KILL\r\n            - MKNOD\r\n            - SETGID\r\n            - SETUID\r\n            - SYS_CHROOT\r\n          privileged: false\r\n          runAsUser: 1000050000\r\n          seLinuxOptions:\r\n            level: s0:c7,c4\r\n        terminationMessagePath: /dev/termination-log\r\n        volumeMounts:\r\n        - mountPath: /hawkular-metrics-certificate\r\n          name: hawkular-metrics-certificate\r\n        - mountPath: /hawkular-openshift-agent-configuration\r\n          name: hawkular-openshift-agent-configuration\r\n        - mountPath: /var/run/secrets/kubernetes.io/serviceaccount\r\n          name: hawkular-agent-token-bkivw\r\n          readOnly: true\r\n      dnsPolicy: ClusterFirst\r\n      nodeSelector:\r\n        hawkular-openshift-agent: \"true\"\r\n      imagePullSecrets:\r\n      - name: hawkular-agent-dockercfg-fckcj\r\n      restartPolicy: Always\r\n      securityContext:\r\n        fsGroup: 1000050000\r\n        seLinuxOptions:\r\n          level: s0:c7,c4\r\n      serviceAccount: hawkular-agent\r\n      serviceAccountName: hawkular-agent\r\n      terminationGracePeriodSeconds: 30\r\n      volumes:\r\n      - name: hawkular-metrics-certificate\r\n        secret:\r\n          secretName: hawkular-metrics-certificate\r\n      - configMap:\r\n          name: hawkular-openshift-agent-configuration\r\n        name: hawkular-openshift-agent-configuration\r\n      - name: hawkular-agent-token-bkivw\r\n        secret:\r\n          secretName: hawkular-agent-token-bkivw\r\n```\r\n\r\nThe agent configmap is\r\n```\r\nkind: ConfigMap\r\napiVersion: v1\r\nname: Hawkular OpenShift Agent Configuration\r\nmetadata:\r\n  name: hawkular-openshift-agent-configuration\r\n  labels:\r\n    metrics-infra: agent\r\ndata:\r\n  config.yaml: |\r\n    collector:\r\n      minimum_collection_interval_secs: 10\r\n      metric_id_prefix: pod/${POD:uid}/custom/\r\n      tags:\r\n        metric_name: ${METRIC:name}\r\n        description: ${METRIC:description}\r\n        units: ${METRIC:units}\r\n        namespace_id: ${POD:namespace_uid}\r\n        namespace_name: ${POD:namespace_name}\r\n        node_name: ${POD:node_name}\r\n        pod_id: ${POD:uid}\r\n        pod_ip: ${POD:ip}\r\n        pod_name: ${POD:name}\r\n        pod_namespace: ${POD:namespace_name}\r\n        hostname: ${POD:hostname}\r\n        host_ip: ${POD:host_ip}\r\n        labels: ${POD:labels}\r\n        type: pod\r\n        collector: hawkular_openshift_agent\r\n        custom_metric: true\r\n```\r\nAnd the application config map\r\n```\r\nkind: ConfigMap\r\napiVersion: v1\r\nmetadata:\r\n  name: app-metrics-config\r\ndata:\r\n  hawkular-openshift-agent: |\r\n    collection_interval_secs: 5\r\n    endpoints:\r\n    - type: prometheus\r\n      protocol: http\r\n      port: 9101\r\n      path: /metrics\r\n    - type: jolokia\r\n      protocol: https\r\n      port: 8778\r\n      path: /jolokia\r\n    identity:\r\n```\r\n\r\nIf I try to deploy with an empty idendity defined, I see the following error log\r\n```\r\nW1221 14:33:19.343443       1 metrics_collector_manager.go:106] Failed to collect metrics from [https://10.1.6.5:8778/jolokia]. err=Failed to collect metrics from Jolokia endpoint [https://10.1.6.5:8778/jolokia]. err=Post https://10.1.6.5:8778/jolokia: EOF\r\n```\r\n\r\n\r\nIf I add OpenShift master CA as a CA file, I get another error  because my private key is incorrect:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/comments/268554640","html_url":"https://github.com/hawkular/hawkular-openshift-agent/issues/71#issuecomment-268554640","issue_url":"https://api.github.com/repos/hawkular/hawkular-openshift-agent/issues/71","id":268554640,"user":{"login":"jmazzitelli","id":2029470,"avatar_url":"https://avatars.githubusercontent.com/u/2029470?v=3","gravatar_id":"","url":"https://api.github.com/users/jmazzitelli","html_url":"https://github.com/jmazzitelli","followers_url":"https://api.github.com/users/jmazzitelli/followers","following_url":"https://api.github.com/users/jmazzitelli/following{/other_user}","gists_url":"https://api.github.com/users/jmazzitelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jmazzitelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmazzitelli/subscriptions","organizations_url":"https://api.github.com/users/jmazzitelli/orgs","repos_url":"https://api.github.com/users/jmazzitelli/repos","events_url":"https://api.github.com/users/jmazzitelli/events{/privacy}","received_events_url":"https://api.github.com/users/jmazzitelli/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T15:42:22Z","updated_at":"2016-12-21T15:42:22Z","body":":) No. I guess I confused you. I meant to connect a browser to /jolokia/version to see if you get a response (just to see if Jolokia is listening - you will get version information from that URL.) But that is not your Jolokia root path - do not put \"/version\" in that \"path\" value here in the agent configmap. Doing that will definitely fail. See if you can connect a browser to https://10.1.6.5:8778/jolokia/version. If that works, then something else is wrong causing the 404."}}
{"actor":{"display_login":"jmazzitelli"}}