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