Sign inSign up

wikiwi/stackdriver-agent

By wikiwi

•Updated almost 9 years ago

stackdriver-agent with easy to use configuration based on Environment Variables.

Image
0

100K+

wikiwi/stackdriver-agent repository overview

⁠stackdriver-agent

Warning: This is an early alpha version without commitment for backwards compatibility.

This projects packs the stackdriver agent⁠ in a Docker Container with easy to use configuration based on Environment Variables. No other metrics other than those configured through the Environment Variables are collected by the agent.

MicroBadger Image Widget

⁠Environment Variables

NameDefaultDescription
STACKDRIVER_API_KEY-Stackdrivers API Key, not needed when running on Google Cloud Platform
MONITOR_HOSTfalseMonitor host resources like memory, cpu, disk, etc..
NGINX_STATUS_URL-URL to the NGINX Status URL
REDIS_#_NODE-Name of Redis Node
REDIS_#_HOSTlocalhostAddress of Redis Node
REDIS_#_PORT6379Port of Redis Node
REDIS_#_TIMEOUT2000Timeout when connecting to Redis Node
POSTGRESQL_#_DB-Database in PostgreSQL instance
POSTGRESQL_#_HOSTlocalhostAddres of PostgreSQL database
POSTGRESQL_#_PORT5432Port of PostgreSQL database
POSTGRESQL_#_USERpostgresUsername to connect to PostgreSQL database
POSTGRESQL_#_PASSWORD-Password to connect to PostgreSQL database

The symbol # represents a continuous number starting at 0

⁠Google Cloud Platform

For authorization information read the official documentation⁠.

⁠Example

# Monitor nginx
docker run -e NGINX_STATUS_URL=http://my-nginx:8080/nginx_status \
           wikiwi/stackdriver-agent

# Monitor host
docker run -e MONITOR_HOST=true -v /proc:/mnt/proc:ro --privileged \
           wikiwi/stackdriver-agent

⁠Running in a Kubernetes Cluster in GKE

To ensure that the agent is running on each one of your nodes in a Kubernetes cluster managed by GKE, deploy the agent as a DaemonSet by adjusting the example stackdriver-agent.yml file to your needs:

## stackdriver-agent.yml ##
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: stackdriver-agent
spec:
  template:
    metadata:
      labels:
      app: stackdriver-agent
    spec:
      containers:
      - name: stackdriver-agent
        image: wikiwi/stackdriver-agent
        securityContext:
          privileged: true
        volumeMounts:
        - mountPath: /mnt/proc
          name: procmnt
        env:
          - name: MONITOR_HOST
            value: "true"
      volumes:
      - name: procmnt
        hostPath:
          path: /proc

Where additional parameters (such as redis monitoring) can be enabled / disabled by adding or removing key/value pairs inside the env field.

*Note: If you want to disable host monitoring, remove the respective key/value pair as well as the securityContext, volumeMounts, and volumes fields.

Tag summary

Content type

Image

Digest

Size

91.2 MB

Last updated

almost 9 years ago

docker pull wikiwi/stackdriver-agent