============================================
|image0| |image1| |image2|
NeReS is a cli tool to manage `NewRelic Synthetics
<https://synthetics.newrelic.com/>`__ monitors with a Synthetics Lite account
(Pro should work too). The tool emulates the actions of a user in the browser
and doesn't use the Synthetics API since that's only available to the Pro
accounts.
With this tool you can:
- List all your monitors, including their success rate, locations,
notifications etc.
- Create, update and delete monitors
- List available locations for monitor installation and
- everything else available though the Web console.
|image3|
Installation
------------
.. code:: shell
$ pip install neres
Configuration
-------------
1. You will need a newrelic account
2. Start by using the `login` command
3. Read the docs or run `--help`
Use
---
Login to NewRelic
~~~~~~~~~~~~~~~~~~
Login to NewRelic with the `login` command:
.. code:: shell
$ neres login
If you have multiple NewRelic accounts you can have different environments:
.. code:: shell
$ neres --environment work login
.. note::
Default environment is named `newrelic`. Remember to always pass `--environment`
to all neres commands to execute them in the correct environment. Alternatively
you can add `NERES_ENVIRONMENT` to your environment variables list.
List Accounts
~~~~~~~~~~~~~
You can list all the accounts connected to the email you used to connect using:
.. code:: shell
$ neres list-accounts
By default neres will act on the first account listed. This command will help
you select a different account by using the `ID` of the account in combination
with the `--account` option or by setting `NERES_ACCOUNT` in your environment.
List Locations
~~~~~~~~~~~~~~
Lists available monitor locations:
.. code:: shell
$ neres list-locations
List Monitors
~~~~~~~~~~~~~
Lists available monitors:
.. code:: shell
$ neres list-monitors
You can only list IDs of the monitors:
.. code:: shell
$ neres list-monitors --ids-only
Or get the raw JSON output from NewRelic:
.. code:: shell
$ neres list-monitors --raw
Add Monitor
~~~~~~~~~~~
Adds a Synthetics monitor:
.. code:: shell
$ neres add-monitor monitorName http://example.com
Use `--help` to get a full list of supported options for the command. All
options are optional.
Get Monitor
~~~~~~~~~~~
Get details on a monitor
.. code:: shell
$ neres get-monitor de310b69-3195-435e-b1ef-3a0af67499de
.. note::
You can use `list-monitors` to get a list of available monitors.
Update Monitor
~~~~~~~~~~~~~~
Update an existing monitor
.. code:: shell
$ neres update-monitor de310b69-3195-435e-b1ef-3a0af67499de --name "Foobar"
Use `--help` to get a full list of supported options for the command. All
options are optional.
Open Monitor
~~~~~~~~~~~~
Open monitor in the browser
.. code:: shell
$ neres open de310b69-3195-435e-b1ef-3a0af67499de
Get state of all monitors of account
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Export the state of all monitors of account in YAML format with
.. code:: shell
$ neres get-state
Save the output into a file, edit and use in combination with the
`update-from-statefile` command to update multiple monitors at once.
.. code:: shell
$ neres get-state > state.yaml
Update monitors from statefile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update monitors from statefile with
.. code:: shell
$ neres update-from-statefile state.yaml
.. note::
This command will only update existing monitors. It will not create new or
delete existing ones.
Credits
-------
This package was created with
`Cookiecutter <https://github.com/audreyr/cookiecutter>`__ and the
`audreyr/cookiecutter-pypackage <https://github.com/audreyr/cookiecutter-pypackage>`__
project template.
.. |image0| image:: https://img.shields.io/pypi/v/neres.svg
.. |image1| image:: https://travis-ci.org/glogiotatidis/neres.svg?branch=master
.. |image2| image:: https://pyup.io/repos/github/glogiotatidis/neres/shield.svg
.. |image3| image:: https://raw.githubusercontent.com/glogiotatidis/neres/asciinema/asciinema-demo.gif
:target: https://asciinema.org/a/145685
=======
History
=======
0.4.0 (2017-06-02)
------------------
* Use NewRelic's "stoplight" to determine monitor health.
0.3.0 (2017-05-25)
------------------
* Multiple monitors management with get-state and update-from-statefile
* Bug fixes
0.2.0 (2017-05-11)
------------------
* Python 3 fixes
* Bugfixes
* Tests!
0.1.1 (2017-04-27)
------------------
* First release on PyPI.
0.1.0 (2017-04-12)
------------------
* Cookiecutter import
Metadata
Release files for neres 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| neres-0.4.1.tar.gz | 23.6 kB | Without provenance | Details for neres-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| neres-0.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for neres-0.4.1-py2.py3-none-any.whl |
Total release size: 38.4 kB
Release files / neres-0.4.1.tar.gz
| Download URL | neres-0.4.1.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec63a98ad3052366770eb8bb30cc938ba85d98d4007ed14e0346d2ed66c5969d
|
|
BLAKE2b-256 checksum How to use checksums |
22954cb0e3c01ce16a2180a75a572699f3f4047a8dab1554e4958bafbe9371eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / neres-0.4.1-py2.py3-none-any.whl
| Download URL | neres-0.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8e50b5908e7203b56e3c42ad14a036dc9afb4024263f0a2007a4a457eb19bab6
|
|
BLAKE2b-256 checksum How to use checksums |
b228c373f4e69df6c83273cf496d29cfa902d840a9e34baf43c8e0e42684415c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for neres 0.4.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.