mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-07 10:49:00 +00:00
Monitoring plugin to separate directory
This commit is contained in:
parent
dca844bf68
commit
a22aea7ab2
@ -1,4 +0,0 @@
|
|||||||
'''
|
|
||||||
Agent to be installed at remote server
|
|
||||||
'''
|
|
||||||
#TODO: 2 implement single process monitoring metric
|
|
@ -2,3 +2,4 @@
|
|||||||
Package contains all original tank tool plugins
|
Package contains all original tank tool plugins
|
||||||
'''
|
'''
|
||||||
from collector import *
|
from collector import *
|
||||||
|
from plugin import *
|
4
yandextank/plugins/Monitoring/agent/__init__.py
Normal file
4
yandextank/plugins/Monitoring/agent/__init__.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
'''
|
||||||
|
Agent to be installed at remote server
|
||||||
|
'''
|
||||||
|
#TODO: 2 implement single process monitoring metric
|
@ -425,9 +425,9 @@ class NetTxRx(AbstractMetric):
|
|||||||
"""
|
"""
|
||||||
status, data = commands.getstatusoutput("/sbin/ifconfig -s")
|
status, data = commands.getstatusoutput("/sbin/ifconfig -s")
|
||||||
logging.debug("/sbin/ifconfig output is: %s", data)
|
logging.debug("/sbin/ifconfig output is: %s", data)
|
||||||
|
|
||||||
rx, tx = 0, 0
|
rx, tx = 0, 0
|
||||||
|
|
||||||
if status == 0:
|
if status == 0:
|
||||||
try:
|
try:
|
||||||
lines = data.split('\n')
|
lines = data.split('\n')
|
||||||
@ -442,7 +442,7 @@ class NetTxRx(AbstractMetric):
|
|||||||
tx += int(counters[tx_pos])
|
tx += int(counters[tx_pos])
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
logging.error('Failed to parse ifconfig output %s: %s', data, e)
|
logging.error('Failed to parse ifconfig output %s: %s', data, e)
|
||||||
|
|
||||||
logging.debug("Total RX/TX packets counters: %s", [str(rx), str(tx)])
|
logging.debug("Total RX/TX packets counters: %s", [str(rx), str(tx)])
|
||||||
|
|
||||||
if self.prev_rx == 0:
|
if self.prev_rx == 0:
|
@ -6,10 +6,10 @@ import traceback
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from yandextank.monitoring import MonitoringCollector, \
|
from collector import MonitoringCollector, \
|
||||||
MonitoringDataListener, MonitoringDataDecoder
|
MonitoringDataListener, MonitoringDataDecoder
|
||||||
from ConsoleOnline import ConsoleOnlinePlugin, AbstractInfoWidget
|
from yandextank.plugins.ConsoleOnline import ConsoleOnlinePlugin, AbstractInfoWidget
|
||||||
from Phantom import PhantomPlugin
|
from yandextank.plugins.Phantom import PhantomPlugin
|
||||||
from yandextank.core import AbstractPlugin
|
from yandextank.core import AbstractPlugin
|
||||||
import yandextank.core as tankcore
|
import yandextank.core as tankcore
|
||||||
from Autostop import AutostopPlugin, AbstractCriteria
|
from Autostop import AutostopPlugin, AbstractCriteria
|
Loading…
Reference in New Issue
Block a user