diff --git a/yandextank/monitoring/agent/__init__.py b/yandextank/monitoring/agent/__init__.py deleted file mode 100644 index 2bc6fcd..0000000 --- a/yandextank/monitoring/agent/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -''' -Agent to be installed at remote server -''' -#TODO: 2 implement single process monitoring metric \ No newline at end of file diff --git a/yandextank/monitoring/__init__.py b/yandextank/plugins/Monitoring/__init__.py similarity index 79% rename from yandextank/monitoring/__init__.py rename to yandextank/plugins/Monitoring/__init__.py index d68ebc9..22bc835 100644 --- a/yandextank/monitoring/__init__.py +++ b/yandextank/plugins/Monitoring/__init__.py @@ -2,3 +2,4 @@ Package contains all original tank tool plugins ''' from collector import * +from plugin import * diff --git a/yandextank/plugins/Monitoring/agent/__init__.py b/yandextank/plugins/Monitoring/agent/__init__.py new file mode 100644 index 0000000..49ab827 --- /dev/null +++ b/yandextank/plugins/Monitoring/agent/__init__.py @@ -0,0 +1,4 @@ +''' +Agent to be installed at remote server +''' +#TODO: 2 implement single process monitoring metric diff --git a/yandextank/monitoring/agent/agent.cfg b/yandextank/plugins/Monitoring/agent/agent.cfg similarity index 100% rename from yandextank/monitoring/agent/agent.cfg rename to yandextank/plugins/Monitoring/agent/agent.cfg diff --git a/yandextank/monitoring/agent/agent.py b/yandextank/plugins/Monitoring/agent/agent.py similarity index 99% rename from yandextank/monitoring/agent/agent.py rename to yandextank/plugins/Monitoring/agent/agent.py index d652930..c7e93ba 100755 --- a/yandextank/monitoring/agent/agent.py +++ b/yandextank/plugins/Monitoring/agent/agent.py @@ -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: diff --git a/yandextank/monitoring/collector.py b/yandextank/plugins/Monitoring/collector.py similarity index 100% rename from yandextank/monitoring/collector.py rename to yandextank/plugins/Monitoring/collector.py diff --git a/yandextank/plugins/Monitoring.py b/yandextank/plugins/Monitoring/plugin.py similarity index 98% rename from yandextank/plugins/Monitoring.py rename to yandextank/plugins/Monitoring/plugin.py index 65eb59f..32abb09 100644 --- a/yandextank/plugins/Monitoring.py +++ b/yandextank/plugins/Monitoring/plugin.py @@ -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