# -*- coding: utf-8 -*-
-# Description: apache netdata python.d plugin
+# Description: apache netdata python.d module
# Author: Pawel Krupa (paulfantom)
from base import UrlService
# default module values (can be overridden per job in `config`)
# update_every = 2
priority = 60000
-retries = 5
+retries = 60
# default job configuration (overridden by python.d.plugin)
# config = {'local': {
def __init__(self, configuration=None, name=None):
UrlService.__init__(self, configuration=configuration, name=name)
if len(self.url) == 0:
- self.url = "http://www.apache.org/server-status?auto"
+ self.url = "http://localhost/server-status?auto"
self.order = ORDER
self.definitions = CHARTS
self.assignment = {"BytesPerReq": 'size_req',
"ConnsAsyncClosing": 'closing',
"ConnsAsyncWriting": 'writing'}
- def _formatted_data(self):
+ def _get_data(self):
"""
Format data received from http request
:return: dict
"""
try:
- raw = self._get_data().split("\n")
+ raw = self._get_raw_data().split("\n")
except AttributeError:
return None
data = {}