Skip to main content
# n2cw - Nagios to CloudWatch

n2cw is a wrapper for check scripts that implement the
[Nagios Plugin API](http://nagios.sourceforge.net/docs/3_0/pluginapi.html). It
runs the specified check command and pushes the results, optionally including
metrics for all [perfdata](http://nagios.sourceforge.net/docs/3_0/perfdata.html).

## Installation

```
pip install n2cw
```

## Usage

```
usage: n2cw [options] namespace base_name -- command

A wrapper for nagios-style checks that pushes check status and perfdata to
CloudWatch metrics.

positional arguments:
namespace CloudWatch namespace
base_name Base name for checks
command Command (nagios check) to run

optional arguments:
-h, --help show this help message and exit
--dimensions key=value,key=value
CloudWatch metric dimensions
--noop Don't push metrics, just log
--no-perfdata Don't send metrics for performance data
--no-status Don't send the check status output
```

`command` is the full command line, with arguments, for the nagios plugin you
wish to run.

## Example

```
n2cw --dimensions "Host=webserver1" MySuperWebsite Disk -- ./check_disk -w 10% -c 5% -p / -k
```

If the output of check_disk was ...

```
DISK OK - free space: / 7292772 kB (49% inode=88%);| /=7402636kB;15481742;15481741;0;15481840
```

The following metrics would be pushed to CloudWatch:

```
Namespace Metric Name Value Dimensions
-----------------------------------------------------
MySuperWebsite Disk-Status 0 Host=webserver1
MySuperWebsite Disk-/ 7292772 Host=webserver1
```

The value of the *-Status* metric is the check return code (so OK is 0, WARNING
is 1, etc).

Metadata

Release files for n2cw 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for n2cw 0.1.2
File Size Uploaded Provenance
n2cw-0.1.2.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for n2cw 0.1.2
File Interpreter ABI Platform
n2cw-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.3 kB

Release files / n2cw-0.1.2.tar.gz

Download URL n2cw-0.1.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
83a0d1f887913ceb1d22870d3c9e5c6f41df7f4c99e13160ccd93a339221222d
BLAKE2b-256 checksum
How to use checksums
93303465909042e663d301d63831698dab299b2999e6993229a111c81e782859
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / n2cw-0.1.2-py2.py3-none-any.whl

Download URL n2cw-0.1.2-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a52b412022644df6ebdcba9356f3ac07892c8b9064c5ba810c4142b48599453e
BLAKE2b-256 checksum
How to use checksums
e15af0a33c68d6ada9cdf05deadd121ad7cd6c33d1f20d3bedc86a4dbedfd01b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for n2cw 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page