Reorganized plugins, removed debug stuff from ping plugin.

This commit is contained in:
Tiberiu Chibici 2020-04-15 01:52:07 +03:00
parent a6c4e3270d
commit 2689ee94f9
7 changed files with 12 additions and 19 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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])

View File

@ -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):