Giter Club home page Giter Club logo

rackspace-monitoring-agent-plugins-contrib's Introduction

Rackspace Monitoring Agent Custom plugins

This repository contains contributed custom plugins for the Rackspace Cloud Monitoring agent. For details about installing plugins, see agent plugin check documentation.

How to Contribute

You can contribute your plugins by first forking the repo, committing your changes, and then opening a pull request through github. If you have any questions, feel free to reach out to us on #cloudmonitoring on freenode IRC.

Plugin Requirements

Each plugin must fulfill the following properties:

  • Output a status message to STDOUT
  • Output one or more metrics if it succeeds in obtaining them to STDOUT
  • Contain an appropriate license header
  • Contain example alarm criteria

Status

The status message should be of the form status $status_string, For example, it might be:

status ok succeeded in obtaining metrics

or

status err failed to obtain metrics

The status string should be a summary of the results, with actionable information if it fails.

Metrics

The metrics message should be of the form metric $name $type $value [unit], for example:

metric time int32 1 seconds

The units are optional, and if present should be a string representing the units of the metric measurement. Units may not be provided on string metrics, and may not contain any spaces.

The available types are:

  • string
  • float
  • double
  • int32
  • int64
  • uint32
  • uint64
  • gauge

Alarm Criteria

Each script should contain, just below the license header, in a comment, an example alarm criteria that can be used for the plugin. See the Rackspace Cloud Monitoring Documentation for how to write alarm criteria.

Submodules

Submodules of repositories are stored in the contrib folder in this repo.
There are more plugins in that folder, some of these plugins have dependencies and their own readmes.

The contrib directory contains submodules of more custom plugins that have been used by other teams, including those from openstack and rackspace. These are older plugins for Icehouse/Juno, newer plugins for Kilo can be found at rcbops/rpc-openstack or inside contrib/rpc-openstack/maas/plugins.

You can pull the submodules with

git pull --recurse-submodules
git submodule update --recursive

License Header

The exact content will depend on your chosen license, but we recommend BSD, Apache 2.0, or MIT Licenses. Regardless of license choice the header should contain the author's (or authors') name(s) and email address(es).

rackspace-monitoring-agent-plugins-contrib's People

Contributors

calebgroom avatar dearing avatar doublerr avatar dovy avatar evan4498 avatar fernandohonig avatar fritchie avatar gfa avatar itzg avatar jayofdoom avatar jim-rackspace avatar jirwin avatar jjbuchan avatar joeashcraft avatar kami avatar kaustavha avatar kruzda avatar lmunro avatar matiu2 avatar mburns avatar mckraken avatar nipsy avatar robert-chiniquy avatar robszumski avatar rphillips avatar sffc avatar simonvetter avatar stevekaten avatar tcaddy avatar ynachiket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rackspace-monitoring-agent-plugins-contrib's Issues

Holland mysqldump check needs to prioritize the credentials in the backupsets files

The check currently prioritizes the credentials in the defaults extra files rather than those specified in the backupsets configuration files. If Holland is pointed to a remote instance (e.g. DBaaS) rather than the local instance and the defaults extra file points to the local mysql instance, then the check gives the status on the local instance rather than the remote that the backupsets configuration file points to.

Holland mysqldump check needs ability to check multiple hosts

Holland has the ability to have multiple backupset configurations active at once. The monitoring check only has the ability to check one. In addition the backupset is fixed at the "default" backupset when no backupset is given on the check line rather than reading the active backupsets out of the Holland configuration file.

Holland mysqldump fails to expand ~ causing it to fail to detect a sql credentials file that does exist.

[root@hcluster1-db2 plugins]# ./holland_mysqldump.py
status success holland checked
metric log_age int64 138
metric dump_age int64 139
metric error_count int64 0
metric first_error string none
metric last_error string none
metric sql_creds_exist string false
metric sql_ping_succeeds string true
metric sql_status_succeeds string true
[root@hcluster1-db2 plugins]#

Although, we can see my credentials file is defined as ~/my.cnf.

[root@hcluster1-db2 plugins]# grep ^defaults /etc/holland/backupsets/default.conf
defaults-extra-file = ~/.my.cnf,
[root@hcluster1-db2 plugins]#

And this file does indeed exist.

[root@hcluster1-db2 plugins]# stat ~/.my.cnf
  File: ‘/root/.my.cnf’
  Size: 87          Blocks: 8          IO Block: 4096   regular file
Device: ca01h/51713d    Inode: 786463      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-05-18 18:06:54.239755077 -0500
Modify: 2016-05-18 18:06:54.239755077 -0500
Change: 2016-05-18 18:06:54.239755077 -0500
 Birth: -
[root@hcluster1-db2 plugins]#

Switching this to /root/.my.cnf file seems to be a good work around to make this detect the file properly.

[root@hcluster1-db2 plugins]# grep ^defaults /etc/holland/backupsets/default.conf
defaults-extra-file = /root/.my.cnf,
[root@hcluster1-db2 plugins]# ./holland_mysqldump.py
status success holland checked
metric log_age int64 335
metric dump_age int64 336
metric error_count int64 0
metric first_error string none
metric last_error string none
metric sql_creds_exist string true
metric sql_ping_succeeds string true
metric sql_status_succeeds string true
[root@hcluster1-db2 plugins]#

Although, as a more permanent solution, I ended up modifying line 144 from:

                if os.access(f, os.F_OK):

To:

                if os.access(os.path.expanduser(f), os.F_OK):

Pull request to follow.

Holland monitor fails if root's my.cnf is changed

By default, /root/.my.cnf is used as the credentials for the mysql ping that Holland monitoring performs. This means if a user changes the root password, monitoring fails, even though Holland may still run without issue.

In discussing how this might best be fixed, the two ideas where to simplify the ping check (and not pass the --defaults-file at all, just the Holland user/pass) or to remove the check and use https://github.com/racker/rackspace-monitoring-agent-plugins-contrib/blob/master/mysql_ping.py to monitor MySQL in real time instead of trying to do everything in the one plugin.

Plugins folder proper path?

I installed the mongodb plugin. Is it supposed to show up in mycloud dashboard, or will it only be present on the API?

Also what is the proper path to install the plugin? I am using debian squeeze. Thanks.

Add Documentation on next step

Based on feedback from new user who was pointed to this place, we should update the document to show:

  • How to create server-side monitoring configuration
  • How to write alarm criteria, especially make it clear that only the metric, not the status, can trigger alerts.

Cloud load balancer plugin uses name to create metrics output

each metric is output is identified by 2 variables %s.%s % (name,metric)

name is created by
name = instance.name.lower().replace('-', '_')

if name has spaces the metrics fail to be picked up by the alarm setup as spaces are not filtered

I ended up defaulting the name to a fixed string 'lb', as I am re using the alert syntax between load balancer checks.

For setting up checks I do not see the value of changing the name of the metrics based on the load balancer the name of the metrics should remain the same regardless of the load balancer.

Create a plugin for SNMP

There a various requests for pull data through SNMP. A plugin for advanced users to start using it and experiment would be a very good starting point.

Mysql Replication Check bug

Hey,

Please change line 75 to check for colons before doing the split operation.

Change as follows:

OLD:
 75         SLAVE_STATUS[i.split(':')[0].strip()] = i.split(':')[1].strip()

NEW:
 75         if ":" in i:
 76           SLAVE_STATUS[i.split(':')[0].strip()] = i.split(':')[1].strip()

This is to fix the error that came up when trying to parse the following section of the "show slave status" command:

      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1580
                   Last_Error: Error 'You cannot 'ALTER' a log table if logging is enabled' on query. Default database: 'mysql'. Query: 'ALTER TABLE slow_log
   MODIFY start_time TIMESTAMP NOT NULL,
   MODIFY user_host MEDIUMTEXT NOT NULL,
   MODIFY query_time TIME NOT NULL,
   MODIFY lock_time TIME NOT NULL,
   MODIFY rows_sent INTEGER NOT NULL,
   MODIFY rows_examined INTEGER NOT NULL,
   MODIFY db VARCHAR(512) NOT NULL,
   MODIFY last_insert_id INTEGER NOT NULL,
   MODIFY insert_id INTEGER NOT NULL,
   MODIFY server_id INTEGER UNSIGNED NOT NULL,
   MODIFY sql_text MEDIUMTEXT NOT NULL'
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 32074
              Relay_Log_Space: 48474
              Until_Condition: None

The lines above that contain the rest of the ALTER query have no colons so the split() is failing and causing the program to crash.

Thanks!

Metric Error with php-fpm_status_check.sh

Getting the following error:

Invalid metric line (line=metric accepted_conn uint32 ) - Metric line not in the following format: metric <name> <type> <value> [<unit>]

Looks like the values are not being printed correctly because if I run the script in command line I get the following :

status ok succeeded in obtaining metrics.
metric accepted_conn uint32
metric listen_queue uint32
metric max_listen_queue uint32
metric listen_queue_len uint32
metric idle_processes uint32
metric active_processes uint32
metric total_processes uint32
metric max_active_processes uint32
`metric max_children_reached uint32``

PHP 5.5.9-1ubuntu4.17
nginx/1.4.6

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.