Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias identifier Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad Str Str Str Str Str Assign NameStore Num Assign NameStore Str Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Str Str Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr BoolOpOr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad BinOpAdd ListLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Dict Str Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Dict Str Str Str Str NameLoad NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr While AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpSub AttributeLoad NameLoad attr NameLoad If CompareLt AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad If CompareNotIn NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad attr NameLoad TupleLoad NameLoad NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGt NameLoad NameLoad body Assign NameStore NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareLt NameLoad NameLoad body Assign NameStore NameLoad If CompareIs SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str NameLoad body Assign SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str BoolOpOr NameLoad NameLoad If CompareIs SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str NameLoad body Assign SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index Str Index NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr body Return Dict Str Str SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Call NameLoad While Call AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If Call NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr If CompareGtE NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Num orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr If CompareGtE NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Num Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Return Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Dict Str Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr Str Num keyword Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num handlers ExceptHandler type NameLoad body Return NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str For NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Continue Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Print Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad
N/A N/A 
Multiple Plugin Agent for the New Relic Platform

 N/A helper N/A importlib N/A json N/A logging N/A os N/A requests N/A socket N/A sys N/A Queue queue N/A threading N/A time newrelic_plugin_agent __version__ newrelic_plugin_agent plugins N/A LOGGER N/A N/A logging getLogger __name__ NewRelicPluginAgent N/A N/A helper Controller N/A N/A The NewRelicPluginAgent class implements a agent that polls plugins
    every minute and reports the state to NewRelic.

     N/A IGNORE_KEYS N/A license_key proxy endpoint poll_interval wake_interval N/A MAX_METRICS_PER_REQUEST 10000 N/A PLATFORM_URL https://platform-api.newrelic.com/platform/v1/metrics N/A WAKE_INTERVAL 60 __init__ N/A N/A self args operating_system N/A N/A N/A Initialize the NewRelicPluginAgent object.

        :param argparse.Namespace args: Command line arguments
        :param str operating_system: The operating_system name

         N/A N/A N/A N/A super NewRelicPluginAgent self __init__ args operating_system N/A N/A self derive_last_interval N/A dict N/A N/A self endpoint N/A self PLATFORM_URL N/A N/A self http_headers N/A Accept Content-Type application/json application/json N/A N/A self last_interval_start None N/A N/A self min_max_values N/A dict N/A N/A self _wake_interval N/A N/A N/A N/A N/A self config application get wake_interval N/A N/A N/A N/A self config application get poll_interval N/A self WAKE_INTERVAL N/A N/A self next_wake_interval N/A int N/A self _wake_interval N/A N/A self publish_queue N/A N/A queue Queue N/A N/A self threads N/A list N/A info N/A tuple N/A N/A __version__ N/A list N/A self system_platform N/A N/A N/A LOGGER info Agent v%s initialized, %s %s v%s info N/A setup N/A N/A self N/A N/A N/A Setup the internal state for the controller class. This is invoked
        on Controller.run().

        Items requiring the configuration object should be assigned here due to
        startup order of operations.

         N/A N/A hasattr N/A N/A self config application endpoint N/A N/A N/A self endpoint N/A N/A N/A self config application endpoint N/A N/A N/A self http_headers N/A X-License-Key N/A self license_key N/A N/A self last_interval_start N/A N/A time time N/A agent_data N/A N/A self N/A N/A N/A Return the agent data section of the NewRelic Platform data payload

        :rtype: dict

         N/A N/A host pid version N/A N/A socket gethostname N/A N/A os getpid __version__ N/A property license_key N/A N/A self N/A N/A N/A Return the NewRelic license key from the configuration values.

        :rtype: str

         N/A N/A N/A N/A self config application license_key N/A property poll_plugin N/A N/A self plugin_name plugin config N/A N/A N/A Kick off a background thread to run the processing task.

        :param newrelic_plugin_agent.plugins.base.Plugin plugin: The plugin
        :param dict config: The config for the plugin

         N/A N/A N/A isinstance config N/A list tuple N/A N/A config N/A config N/A instance config N/A N/A thread N/A N/A threading Thread target N/A self thread_process kwargs N/A config name plugin poll_interval instance plugin_name plugin N/A int N/A self _wake_interval N/A N/A N/A thread run N/A N/A N/A N/A self threads append thread N/A process N/A N/A self N/A N/A N/A This method is called after every sleep interval. If the intention
        is to use an IOLoop instead of sleep interval based daemon, override
        the run method.

         N/A start_time N/A N/A time time N/A N/A N/A self start_plugin_polling N/A N/A self threads_running N/A N/A N/A N/A time sleep 1 N/A N/A self threads N/A list N/A N/A N/A self send_data_to_newrelic N/A duration N/A N/A N/A time time start_time N/A N/A self next_wake_interval N/A N/A self _wake_interval duration N/A N/A N/A self next_wake_interval 1 N/A N/A N/A N/A LOGGER warning Poll interval took greater than %i seconds duration N/A N/A self next_wake_interval N/A int N/A self _wake_interval N/A N/A N/A LOGGER info Stats processed in %.2f seconds, next wake in %i seconds duration N/A self next_wake_interval N/A process_min_max_values N/A N/A self component N/A N/A N/A Agent keeps track of previous values, so compute the differences for
        min/max values.

        :param dict component: The component to calc min/max values for

         N/A guid N/A component N/A guid N/A name N/A component N/A name N/A N/A guid N/A N/A N/A self min_max_values keys N/A N/A N/A N/A self min_max_values N/A guid N/A dict N/A N/A name N/A N/A N/A N/A self min_max_values N/A guid keys N/A N/A N/A N/A N/A self min_max_values N/A guid N/A name N/A dict N/A metric N/A component N/A metrics N/A N/A N/A min_val max_val N/A N/A N/A N/A N/A self min_max_values N/A guid N/A name get metric N/A None None N/A value N/A N/A N/A component N/A metrics N/A metric N/A total N/A N/A N/A min_val None N/A min_val value N/A N/A min_val value N/A N/A N/A max_val None N/A max_val value N/A N/A max_val value N/A N/A N/A N/A N/A component N/A metrics N/A metric N/A min None N/A N/A N/A N/A N/A component N/A metrics N/A metric N/A min N/A min_val value N/A N/A N/A N/A N/A component N/A metrics N/A metric N/A max None N/A N/A N/A N/A N/A component N/A metrics N/A metric N/A max max_val N/A N/A N/A N/A N/A self min_max_values N/A guid N/A name N/A metric N/A min_val max_val N/A proxies N/A N/A self N/A N/A N/A Return the proxy used to access NewRelic.

        :rtype: dict

         N/A N/A proxy N/A N/A self config application N/A N/A N/A http https N/A N/A N/A self config application N/A proxy N/A N/A N/A self config application N/A proxy N/A None N/A property send_data_to_newrelic N/A N/A self N/A N/A N/A metrics 0 N/A components N/A list N/A N/A N/A N/A self publish_queue qsize N/A N/A N/A name data last_values N/A N/A N/A self publish_queue get N/A N/A N/A self derive_last_interval N/A name last_values N/A N/A isinstance data list N/A N/A component data N/A N/A N/A N/A self process_min_max_values component N/A N/A N/A components append component N/A metrics N/A len N/A N/A N/A component N/A metrics keys N/A N/A metrics N/A self MAX_METRICS_PER_REQUEST N/A N/A N/A N/A self send_components components metrics N/A components N/A list N/A metrics 0 N/A N/A N/A isinstance data dict N/A N/A N/A N/A self process_min_max_values data N/A N/A N/A components append data N/A metrics N/A len N/A N/A N/A data N/A metrics keys N/A N/A metrics N/A self MAX_METRICS_PER_REQUEST N/A N/A N/A N/A self send_components components metrics N/A components N/A list N/A metrics 0 N/A N/A N/A LOGGER debug Done, will send remainder of %i metrics metrics N/A N/A N/A self send_components components metrics N/A send_components N/A N/A self components metrics N/A N/A N/A Create the headers and payload to send to NewRelic platform as a
        JSON encoded POST body.

         N/A N/A metrics N/A N/A N/A N/A LOGGER warning No metrics to send to NewRelic this interval N/A N/A N/A N/A LOGGER info Sending %i metrics to NewRelic metrics N/A body N/A agent components N/A self agent_data components N/A N/A N/A LOGGER debug body N/A N/A N/A response N/A N/A requests post N/A self endpoint headers N/A self http_headers proxies N/A self proxies data N/A N/A json dumps body ensure_ascii False timeout N/A N/A N/A self config get newrelic_api_timeout 10 verify N/A N/A N/A self config get verify_ssl_cert True N/A N/A N/A LOGGER debug Response: %s: %r N/A response status_code N/A N/A N/A response content strip N/A N/A N/A N/A requests ConnectionError N/A error N/A N/A N/A N/A LOGGER error Error reporting stats: %s error N/A N/A N/A requests Timeout N/A error N/A N/A N/A N/A LOGGER error TimeoutError reporting stats: %s error N/A _get_plugin N/A N/A plugin_path N/A N/A N/A Given a qualified class name (eg. foo.bar.Foo), return the class

        :rtype: object

         N/A N/A N/A N/A package class_name N/A N/A plugin_path rsplit . 1 N/A N/A N/A ValueError N/A N/A None N/A N/A N/A module_handle N/A N/A importlib import_module package N/A class_handle N/A getattr module_handle class_name N/A class_handle N/A N/A N/A ImportError N/A N/A N/A N/A LOGGER exception Attempting to import %s plugin_path N/A None N/A staticmethod start_plugin_polling N/A N/A self N/A N/A N/A Iterate through each plugin and start the polling process. N/A plugin N/A key N/A key N/A N/A N/A N/A self config application keys N/A key N/A self IGNORE_KEYS N/A N/A N/A N/A LOGGER info Enabling plugin: %s plugin N/A plugin_class None N/A N/A plugin N/A plugins available N/A N/A plugin_class N/A N/A self _get_plugin N/A N/A plugins available N/A plugin N/A N/A N/A . plugin N/A N/A plugin_class N/A N/A self _get_plugin plugin N/A N/A plugin_class N/A N/A N/A N/A LOGGER error Enabled plugin %s not available plugin N/A N/A N/A N/A self poll_plugin plugin plugin_class N/A N/A N/A N/A self config application get plugin N/A threads_running N/A N/A self N/A N/A N/A Return True if any of the child threads are alive

        :rtype: bool

         N/A thread N/A self threads N/A N/A N/A N/A thread is_alive N/A N/A True N/A False N/A property thread_process N/A N/A self name plugin config poll_interval N/A N/A N/A Created a thread process for the given name, plugin class,
        config and poll interval. Process is added to a Queue object which
        used to maintain the stack of running plugins.

        :param str name: The name of the plugin
        :param newrelic_plugin_agent.plugin.Plugin plugin: The plugin class
        :param dict config: The plugin configuration
        :param int poll_interval: How often the plugin is invoked

         N/A instance_name N/A %s:%s N/A name N/A N/A config get name unnamed N/A obj N/A plugin config poll_interval N/A N/A N/A self derive_last_interval get instance_name N/A N/A N/A obj poll N/A N/A N/A N/A self publish_queue put N/A instance_name N/A N/A obj values N/A obj derive_last_interval N/A wake_interval N/A N/A self N/A N/A N/A Return the wake interval in seconds as the number of seconds
        until the next minute.

        :rtype: int

         N/A N/A self next_wake_interval N/A property N/A main N/A N/A N/A N/A N/A N/A N/A N/A helper parser description The NewRelic Plugin Agent polls various services and sends the data to the NewRelic Platform N/A N/A N/A N/A helper parser name newrelic_plugin_agent N/A argparse N/A N/A N/A helper parser get N/A N/A N/A argparse add_argument -C action store_true dest configure help Run interactive configuration N/A args N/A N/A N/A helper parser parse N/A N/A args configure N/A N/A Configuration N/A N/A N/A sys exit 0 N/A N/A N/A helper start NewRelicPluginAgent N/A N/A N/A __name__ __main__ N/A N/A N/A N/A logging basicConfig level N/A logging DEBUG N/A N/A main