racker/rackspace-monitoring-poller

Name: rackspace-monitoring-poller

Owner: racker

Description: Rackspace Monitoring Poller

Created: 2016-11-09 17:23:22.0

Updated: 2018-03-21 14:52:53.0

Pushed: 2018-03-21 14:58:19.0

Homepage:

Size: 28825

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Go Documentation Coverage Status GitHub release

Installing and Running a Poller Instance

NOTE: These instructions are only a brief, informal procedure. Details such as locating the monitoring_token will be described elsewhere.

From the latest release, download either the “deb” package or one of the standalone binaries listed after the debian package.

APT

NOTE: the following “apt repo” procedure is only supported on upstart based systems such as Ubuntu 14.04 Trusty.

get update
 https://monitoring.api.rackspacecloud.com/pki/agent/linux.asc | sudo apt-key add -
 "deb [arch=amd64] http://stable.poller.packages.cloudmonitoring.rackspace.com/debian cloudmonitoring main" > /etc/apt/sources.list.d/cloudmonitoring.list
get update
get install rackspace-monitoring-poller -y

Proceed to configuring your poller.

DEB package installation directly

NOTE: there are two deb packages provided. The one with the -systemd qualifier should be installed on systems that use systemd for the init system, such as Ubuntu 15.04 Vivid and greater. The other deb package should be installed on systems that use upstart.

Install the package with dpkg -i rackspace-monitoring-poller_*.deb.

Proceed to configuring your poller.

Configuration for debian install

Adjust these configuration files

Start the poller service using:

 initctl start rackspace-monitoring-poller 
Standalone Binary

Use chmod +x to mark the binary executable. For convenience, you can rename it to rackspace-monitoring-poller, which is what the following instructions will reference.

Using this sample place the poller's configuration file in a location of your choosing or the default location of /etc/rackspace-monitoring-poller.cfg.

Start the poller with the default configuration file location

ckspace-monitoring-poller serve

or specify a custom confiuration file location:

ckspace-monitoring-poller serve --config custom.cfg
Installing as a Windows service

The rackspace-monitoring-poller executable includes a pair of commands to manage running the poller as a Windows service.

To install the Windows service run the following in a terminal with administrator privileges:

ckspace-monitoring-poller_windows_amd64.exe install-service --config CONFIG_PATH --logfile LOG_FILE_PATH

where you will need to replace the CONFIG_PATH and LOG_FILE_PATH with absolute paths to the respective location. After you have populated the specified configuration file, according to the next section, then you can start the Windows service:

start "Rackspace Monitoring Poller"

To uninstall the service, run the following:

ckspace-monitoring-poller_windows_amd64.exe uninstall-service

Configuration options

Parameter | Type | Description ———-|——|———— monitoring_id | string | Optional. Specifies a user-provided id string that identifies this agent to the monitoring services. monitoring_token | string | Required. This token gives the poller access to the monitoring services for an account. See the section below. monitoring_private_zones | string | Required. A private monitoring zone that this poller supports. More than one poller can and should support a given monitoring zone. See the section below. monitoring_endpoints | comma-delimited sets of ip:port values | Optional. Provides a series of endpoint IP addresses for the agent to connect to instead of the default endpoint addresses. monitoring_snet_region | string | Optional. This option tells the poller to connect to the agent endpoints over the Rackspace ServiceNet (instead of over the public Internet) monitoring_proxy_url | url | Optional. Provides a URL string to a HTTP Proxy service that supports the CONNECT command. prometheus_uri | url | Optional. A Prometheus gateway where internal poller operation metrics can be sent. statsd_endpoint | host:port | Optional. The address of a UDP statsd receiver that will receive all of the same metrics sent into the Rackspace agent endpoint.

Preparing your Rackspace Monitoring account

The Rackspace Monitoring Poller is primarily intended to be used as part of your overall Rackspace Monitoring setup. You will need to ensure the following items are prepared before you can effectively use one or more poller instances:

The examples below show use of the Rackspace Monitoring REST API, but you can also use the Rackspace Monitoring CLI.

Using the REST API requires obtaining a token ID and knowing your tenant ID. This page in the developer guide explains this procedure. The examples exclude the service access endpoint and path prefix for brevity. The actual calls should be invoked against https://monitoring.api.rackspacecloud.com/v1.0/$TENANT_ID

Enable private zones feature

Private zone monitoring is currently a limited-availability feature, so please contact Rackspace Support to request this feature to be enabled on your account.

Locate or create a monitoring token

In order for your poller instance to authenticate against your Rackspace Monitoring account you will either need to obtain an existing token from your account or create a new one. The latter is a good practice in order to delineate the authentication of your private zone pollers independent of your on-node agents.

NOTE: the token is traditionally referred to as an agent token, but the concept is interchangeable with monitoring tokens.

You can list existing tokens by invoking:

/agent_tokens

and using the token from the appropriate entry in the response list.

You can also create a new token by invoking:

 /agent_tokens

You may choose any label that you would like.

Allocate a private zone

A private zone is allocated by invoking

 /monitoring_zones

The JSON object payload contains the following attributes:

Name | Description | Validation —–|————-|———– label | A label of your choosing | (Required) Non-empty string metadata | Arbitrary key/value pairs | (Optional) Object of string values, up to 256 keys. Values and keys must be less than 255 characters.

A response status of 201 indicates that the zone was successfully created. The X-Object-ID response header contains the ID that is used in the poller configuration file, above, and the check creation, below. The full details of the newly created zone can be retrieving from the URL in the Location response header.

Creating remote checks to run in a private zone

Creating a check for a private zone uses the existing API to create a check. Be sure to pass the private zone ID in the monitoring_zones_poll array attribute.

The following check types are currently supported:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.