Skip to main content

Python Client for Netuitive Cloud

Project description

BuildStatus

What is Netuitive monitoring?

Netuitive provides an adaptive monitoring and analytics platform for cloud infrastructure and web applications. Netuitive learns behaviors and utilizes pre-set dynamic policies that reduce the manual effort and human-guesswork typically required to monitor systems and applications. This unique technology enables IT operations and developers to automate performance analysis, detect relevant anomalies, and determine efficient capacity utilization.

Features

  • Create a Netuitive Element with the following data:
    • Element Name

    • Attributes

    • Tags

    • Metric Samples

    • Element relations

    • Location

    • Metric Tags

  • Create a Netuitive Event with the following data
    • Element Name

    • Event Type

    • Title

    • Message

    • Level

    • Tags

    • Source

Usage

###### Setup the Client

ApiClient = netuitive.Client(api_key='<my_api_key>')

###### Setup the Element

MyElement = netuitive.Element()

###### Add an Attribute

MyElement.add_attribute('Language', 'Python')

###### Add an Element relation

MyElement.add_relation('my_child_element')

###### Add a Tag

MyElement.add_tag('Production', 'True')

###### Add a Metric Sample

MyElement.add_sample('cpu.idle', 1432832135, 1, host='my_hostname')

###### Add a Metric Sample with a Sparse Data Strategy

MyElement.add_sample('app.zero', 1432832135, 1, host='my_hostname', sparseDataStrategy='ReplaceWithZero')

###### Add a Metric Sample with unit type

MyElement.add_sample('app.requests', 1432832135, 1, host='my_hostname', unit='requests/s')

###### Add a Metric Sample with utilization tag

MyElement.add_sample('app.requests', 1432832135, 1, host='my_hostname', tags=[{'utilization': 'true'}])

###### Add a Metric Sample with min/max values

MyElement.add_sample('app.percent_used', 1432832135, 50, host='my_hostname', unit='percent', min=0, max=100)

###### Send the Samples

ApiClient.post(MyElement)

###### Remove the samples already sent

MyElement.clear_samples()

###### Create an Event

MyEvent = netuitive.Event(hst, 'INFO', 'test event','big old test message', 'INFO')

###### Send the Event

ApiClient.post_event(MyEvent)

###### Check that our local time is set correctly (returns True/False)

ApiClient.time_insync()

Example

import netuitive

ApiClient = netuitive.Client(api_key=’aaaa9956110211e594444697f922ec7b’)

MyElement = netuitive.Element()

MyElement.add_attribute(‘Language’, ‘Python’) MyElement.add_attribute(‘app_version’, ‘7.0’)

MyElement.add_relation(‘my_child_element’)

MyElement.add_tag(‘Production’, ‘True’) MyElement.add_tag(‘app_tier’, ‘True’)

MyElement.add_sample(‘app.error’, 1432832135, 1, host=’appserver01’) MyElement.add_sample(‘app.request’, 1432832135, 10, host=’appserver01’)

ApiClient.post(MyElement)

MyElement.clear_samples()

MyEvent = netuitive.Event(‘appserver01’, ‘INFO’, ‘test event’,’big old test message’, ‘INFO’)

ApiClient.post_event(MyEvent)

if ApiClient.time_insync():

print(‘we have time sync with the server’)

History

0.1.1 (2016-03-08)

  • Add server time offset check

  • Fix default event time

0.1.0 (2016-01-27)

  • Add metric tag support

  • Add min/max/avg/sum/cnt support

  • Add Element location support

  • Test re-factor

  • Increase test coverage

  • Fix for event support

0.0.9 (2015-12-03)

  • Add custom client string

  • Add relation support

0.0.8 (2015-10-16)

  • Add event support

  • Add Python 3 support

0.0.7 (2015-06-23)

  • Fix for Preventing duplicate metrics

0.0.6 (2015-06-23)

  • Add support for Spare Data Strategy and Unit settings for Metrics

  • Prevent duplicate metrics

  • Documentation improvements

0.0.5 (2015-06-12)

  • Element type is now easier to set

0.0.3 (2015-06-01)

  • Fixes for API URL setting

0.0.2 (2015-05-28)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netuitive-0.1.1.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netuitive-0.1.1-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file netuitive-0.1.1.tar.gz.

File metadata

  • Download URL: netuitive-0.1.1.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for netuitive-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e3c0a7ddb6cb89f091881b03037c6f8213e3fbf3735a79602a78f4fdb5ea843d
MD5 2a58d25ea86fb8db3cd1e5d3c36ff8e9
BLAKE2b-256 abf0d8cbe37daf9da3437dd6384265abc059f98752b613dec30827d43a1b5d50

See more details on using hashes here.

File details

Details for the file netuitive-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for netuitive-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e858b29d54cf303dd361bfd6e503ef96769a6f6eab1516c6da09461555cf04a5
MD5 d34ef78ca1d1dcb686716458b6723bfd
BLAKE2b-256 aa1b017e1bca744c6f3112d799397468dae8c5a63562903e4361c05e4231d151

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page