Monitoring plugin to separate directory

This commit is contained in:
Alexey Lavrenuke 2015-02-04 15:01:36 +03:00
parent dca844bf68
commit a22aea7ab2
7 changed files with 11 additions and 10 deletions

View File

@ -1,4 +0,0 @@
'''
Agent to be installed at remote server
'''
#TODO: 2 implement single process monitoring metric

View File

@ -2,3 +2,4 @@
Package contains all original tank tool plugins
'''
from collector import *
from plugin import *

View File

@ -0,0 +1,4 @@
'''
Agent to be installed at remote server
'''
#TODO: 2 implement single process monitoring metric

View File

@ -425,9 +425,9 @@ class NetTxRx(AbstractMetric):
"""
status, data = commands.getstatusoutput("/sbin/ifconfig -s")
logging.debug("/sbin/ifconfig output is: %s", data)
rx, tx = 0, 0
if status == 0:
try:
lines = data.split('\n')
@ -442,7 +442,7 @@ class NetTxRx(AbstractMetric):
tx += int(counters[tx_pos])
except Exception, e:
logging.error('Failed to parse ifconfig output %s: %s', data, e)
logging.debug("Total RX/TX packets counters: %s", [str(rx), str(tx)])
if self.prev_rx == 0:

View File

@ -6,10 +6,10 @@ import traceback
import fnmatch
import datetime
from yandextank.monitoring import MonitoringCollector, \
from collector import MonitoringCollector, \
MonitoringDataListener, MonitoringDataDecoder
from ConsoleOnline import ConsoleOnlinePlugin, AbstractInfoWidget
from Phantom import PhantomPlugin
from yandextank.plugins.ConsoleOnline import ConsoleOnlinePlugin, AbstractInfoWidget
from yandextank.plugins.Phantom import PhantomPlugin
from yandextank.core import AbstractPlugin
import yandextank.core as tankcore
from Autostop import AutostopPlugin, AbstractCriteria