Git Product home page Git Product logo

stackdriver-agent's Introduction

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

Name Default Description
STACKDRIVER_API_KEY - Stackdrivers API Key, not needed when running on Google Cloud Platform
MONITOR_HOST false Monitor host resources like memory, cpu, disk, etc..
NGINX_STATUS_URL - URL to the NGINX Status URL
REDIS_#_NODE - Name of Redis Node
REDIS_#_HOST localhost Address of Redis Node
REDIS_#_PORT 6379 Port of Redis Node
REDIS_#_TIMEOUT 2000 Timeout when connecting to Redis Node
POSTGRESQL_#_DB - Database in PostgreSQL instance
POSTGRESQL_#_HOST localhost Addres of PostgreSQL database
POSTGRESQL_#_PORT 5432 Port of PostgreSQL database
POSTGRESQL_#_USER postgres Username 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.

stackdriver-agent's People

Contributors

cvle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.