Reorganized plugins, removed debug stuff from ping plugin.
This commit is contained in:
parent
a6c4e3270d
commit
2689ee94f9
12
collector.py
12
collector.py
@ -2,12 +2,12 @@ import config
|
||||
import database
|
||||
import signal
|
||||
from threading import Event
|
||||
from plugins.cpu_plugin import CpuPlugin
|
||||
from plugins.memory_plugin import MemoryPlugin
|
||||
from plugins.disk_plugin import DiskPlugin
|
||||
from plugins.network_plugin import NetworkPlugin
|
||||
from plugins.temperatures_plugin import TemperaturesPlugin
|
||||
from plugins.ping_plugin import PingPlugin
|
||||
from plugins.system.cpu_plugin import CpuPlugin
|
||||
from plugins.system.memory_plugin import MemoryPlugin
|
||||
from plugins.system.disk_plugin import DiskPlugin
|
||||
from plugins.system.network_plugin import NetworkPlugin
|
||||
from plugins.system.temperatures_plugin import TemperaturesPlugin
|
||||
from plugins.system.ping_plugin import PingPlugin
|
||||
|
||||
class Collector(object):
|
||||
|
||||
|
@ -6,8 +6,7 @@ from playhouse.shortcuts import model_to_dict
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class Cpu(BaseModel):
|
@ -7,8 +7,7 @@ from playhouse.shortcuts import model_to_dict
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class DiskUsage(BaseModel):
|
@ -5,8 +5,7 @@ from peewee import *
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class Memory(BaseModel):
|
@ -7,8 +7,7 @@ from playhouse.shortcuts import model_to_dict
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class NetworkIO(BaseModel):
|
@ -9,8 +9,7 @@ from playhouse.shortcuts import model_to_dict
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class Ping(BaseModel):
|
||||
@ -43,7 +42,6 @@ class PingPlugin(Plugin):
|
||||
entry.ping = float(match.group(1))
|
||||
|
||||
entry.save()
|
||||
print(model_to_dict(entry))
|
||||
|
||||
async def execute_internal(self):
|
||||
await asyncio.gather(*[self.do_ping(host) for host in config.PING_HOSTS])
|
@ -7,8 +7,7 @@ from playhouse.shortcuts import model_to_dict
|
||||
|
||||
import config
|
||||
from database import BaseModel
|
||||
|
||||
from .plugin import Plugin
|
||||
from plugins.plugin import Plugin
|
||||
|
||||
|
||||
class Temperatures(BaseModel):
|
Loading…
Reference in New Issue
Block a user