This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

wywygmbh/check-puppet-agent

A small script with few dependencies to check the status of puppet agent runs

It is tested as a sensu check plugin, but also compatible with nagios/icinga/… due to the similar exit codes

Installation

dependencies

The requirements are just:

  • argparse (command line argument parsing)
  • yaml (to read the puppet state files)
  • six (python 2 and 3 compatibility)

pip

The package is easily available on pypi and can be just installed with pip, this also includes the command line script

$ pip install check-puppet-agent

RPM

Currently there are no prebuilt RPM packages provided, but you can built them by yourself with some simple commands

$ git clone … $ cd check-puppet-agent $ python setup.py bdist_rpm

Usage

Note: The script is to run as puppet user or root, otherwise it is not able to read the required files

$ check-puppet-agent
[CRITICAL] applying catalog compiled at 2015-12-06 21:50:21 (1 days 20 hours 3 minutes 23 seconds ago)
[      OK] last run on 2015-12-08 17:36:19 (17 minutes 25 seconds ago)
[      OK] => last run took 11 seconds

Sample if the agent is disabled by puppet agent --disable "test"

$ check-puppet-agent
[ WARNING] puppet agent is disabled - reason: test
[CRITICAL] applying catalog compiled at 2015-12-06 21:50:21 (1 days 20 hours 4 minutes 53 seconds ago)
[      OK] last run on 2015-12-08 17:36:19 (18 minutes 55 seconds ago)
[      OK] => last run took 11 seconds

Options

$ check-puppet-agent --help
usage: check_puppet [-h] [--warning-run-age WARNING_RUN_AGE]
                    [--critical-run-age CRITICAL_RUN_AGE]
                    [--warning-catalog-age WARNING_CATALOG_AGE]
                    [--critical-catalog-age CRITICAL_CATALOG_AGE]
                    [--warning-run-duration WARNING_RUN_DURATION]
                    [--critical-run-duration CRITICAL_RUN_DURATION]
                    [--filename FILENAME]
                    [--disabled-lock-file DISABLED_LOCK_FILE]
                    [--run-lock-file RUN_LOCK_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --warning-run-age WARNING_RUN_AGE
                        warn at age of last puppet run in seconds (default:
                        1h5m) => 0s to disable
  --critical-run-age CRITICAL_RUN_AGE
                        critical at age of last puppet run in seconds
                        (default: 2h10m) => 0s to disable
  --warning-catalog-age WARNING_CATALOG_AGE
                        warn at catalog age in seconds (default: 1h5m) => 0s
                        to disable
  --critical-catalog-age CRITICAL_CATALOG_AGE
                        critical at catalog age in seconds (default: 2h10m) =>
                        0s to disable
  --warning-run-duration WARNING_RUN_DURATION
                        warn at puppet run duration in seconds (default: 20m)
                        => 0s to disable
  --critical-run-duration CRITICAL_RUN_DURATION
                        critical at puppet run duration in seconds (default:
                        30m) => 0s to disable
  --filename FILENAME   the puppet state file to parse
  --disabled-lock-file DISABLED_LOCK_FILE
                        the path to the lock file if the agent is disabled
  --run-lock-file RUN_LOCK_FILE
                        the path to the lock file if the agent is running

License

Copyright 2015 wywy GmbH

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This script is proudly presented by the DevOps guys at wywy GmbH.

Release History

Release History

1.0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
check_puppet_agent-1.0.0-py2.py3-none-any.whl (9.0 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Dec 8, 2015
check_puppet_agent-1.0.0-py3.5.egg (10.0 kB) Copy SHA256 Checksum SHA256 3.5 Egg Dec 8, 2015
check-puppet-agent-1.0.0.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 Source Dec 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting