(unofficial) NewRelic Synthetics CLI
Project description
NewRelic Synthetics (unofficial) CLI (NeReS)
============================================
|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.
Use the tools you can:
- List all your monitors, including their success rate, locations,
notifications etc.
- Create, update and delete monitors
- List available locations for monitor installation
Everything you can do using the Web console is supported and provided to your
shell prompt.
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
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
=======
History
=======
0.1.2 (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
============================================
|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.
Use the tools you can:
- List all your monitors, including their success rate, locations,
notifications etc.
- Create, update and delete monitors
- List available locations for monitor installation
Everything you can do using the Web console is supported and provided to your
shell prompt.
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
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
=======
History
=======
0.1.2 (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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
neres-0.2.0.tar.gz
(21.0 kB
view hashes)
Built Distribution
neres-0.2.0-py2.py3-none-any.whl
(13.0 kB
view hashes)
Close
Hashes for neres-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac8a8948d8b8be49dced8f093e3773cbf27fb931559214c0d6072c6a4d147da |
|
MD5 | 8d31a3a12d82416aca9adea7192adef0 |
|
BLAKE2b-256 | 5158ac1824618e9fb0bdc27695872a033cd47d2f1c4101cb4523326b5f42c39b |