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

Kubernetes Monitoring #42

Open
kjvalencik opened this issue May 27, 2016 · 7 comments
Open

Kubernetes Monitoring #42

kjvalencik opened this issue May 27, 2016 · 7 comments

Comments

@kjvalencik
Copy link

I am trying to use the docker agent to monitor containers running in Kubernetes. However, the agent assumes that when it is running in a container it will have a static name assigned to it. This is not possible if the agent is running inside the cluster. Instead, it will have a dynamic name based on a few bits of information.

Example:

k8s_agent.3a124fb0_scalyr-agent-kube1_kube-system_d1d11bd4b2f5fa9549577f46efe9fc20_408ef626

It would be great if the container_name parameter to the docker_monitor module also supported some sort of pattern matching. E.g.,

{
    "container_name": "*_scalyr-agent-*"
}

As a work around, I'm able to set "container_name" : "", but this causes the agent to monitor itself.

Another feature that would be great for monitoring K8S would be automatic parsing of container names in order to populate some meta data about the container. For example, the above name indicates that the name of the pod is scalyr-agent, it's running on the kube1 node in the kube-system namespace.

@steve-scalyr
Copy link
Contributor

Thanks for getting in touch!

Would you have five minutes for a quick call to review your setup and
confirm the technical details? Then we should be able to put together an
updated agent for you.

Please let us know what would work for your schedule.

Cheers,
Steve

On Fri, May 27, 2016 at 7:50 AM, K.J. Valencik notifications@github.com
wrote:

I am trying to use the docker agent to monitor containers running in
Kubernetes. However, the agent assumes that when it is running in a
container it will have a static name assigned to it. This is not possible
if the agent is running inside the cluster. Instead, it will have a dynamic
name based on a few bits of information.

Example:

k8s_agent.3a124fb0_scalyr-agent-kube1_kube-system_d1d11bd4b2f5fa9549577f46efe9fc20_408ef626

It would be great if the container_name parameter to the docker_monitor
module also supported some sort of pattern matching. E.g.,

{
"container_name": "__scalyr-agent-_"
}

As a work around, I'm able to set "container_name" : "", but this causes
the agent to monitor itself.

Another feature that would be great for monitoring K8S would be automatic
parsing of container names in order to populate some meta data about the
container. For example, the above name indicates that the name of the pod
is scalyr-agent, it's running on the kube1 node in the kube-system
namespace.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#42, or mute the thread
https://github.com/notifications/unsubscribe/ABDJerFWTBgp-u-DIb1NP3Z1yd_TExhjks5qFwTLgaJpZM4Iokya
.

@seanwbren
Copy link

Hi @steve-scalyr , I'm also wondering if this * naming scheme is possible on the docker agent. Thanks!

@kjvalencik
Copy link
Author

@sbberk I ended up solving this by setting an environment variable using the downward api.

http://kubernetes.io/docs/user-guide/downward-api/

@hjacobs
Copy link

hjacobs commented Dec 8, 2016

@kjvalencik we are working on https://github.com/zalando-incubator/kubernetes-log-watcher to ship logs to Scalyr (requires Scalyr agent) --- maybe it helps (docs and more missing).

@jeffkimble
Copy link

+1 on out of the box K8S support.

@pierreozoux
Copy link

I did create this chart, if anybody is interested to try :)
helm/charts#1066

@scottrigby
Copy link

scottrigby commented May 7, 2019

@pierreozoux I drew from some of your earlier work for a new Scalyr Helm chart. Check out #118 (comment) if you're still interested in this - always up for collaboration 😄

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

7 participants