cd /py/AutoClient/bin python3 auto-client.py /usr/local/python3/bin/pip install requests python3 auto-client.py https://www.bejson.com/ { 'os_platform': 'Linux', 'os_version': '\\S', 'hostname': 'DKL18U83RFAQI3G', 'cpu': { 'status': True, 'message':…
#settings.py """ Django settings for AutoCmdb project. Generated by 'django-admin startproject' using Django 2.0.6. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings…
#base.py # ————————01CMDB获取服务器基本信息———————— from config import settings #配置文件 class BasePlugin(object): def __init__(self, hostname=''): if hasattr(settings, 'MODE'): self.mode = settings.MODE #采集资产的方式 else: self.mode = 'agent'#默认,采集资产的方式 def execute(…
root 123456 ip addr init 0 root 123456 ip addr root 123456 python3 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel yum -y install wget 在Linux上安装Python3…
https://www.virtualbox.org/wiki/Downloads https://mirrors.aliyun.com/centos/7/isos/x86_64/ http://www.xitongzhijia.net/soft/24315.html http://www.downxia.com/downinfo/4574.html…
#settings.py # ————————01CMDB获取服务器基本信息———————— import os BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))##当前路径 # 采集资产的方式,选项有:agent(默认), salt, ssh MODE = 'agent' # ————————01CMDB获取服务器基本信息———————— # ————————02CMDB将服务器基本信息提交到API接口—…
#settings.py # ————————01CMDB获取服务器基本信息———————— import os BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))##当前路径 # 采集资产的方式,选项有:agent(默认), salt, ssh MODE = 'agent' # ————————01CMDB获取服务器基本信息———————— # ————————02CMDB将服务器基本信息提交到API接口—…
#__init__.py # ————————05CMDB采集硬件数据的插件———————— from config import settings import importlib # ————————05CMDB采集硬件数据的插件———————— # ————————01CMDB获取服务器基本信息———————— from src.plugins.basic import BasicPlugin def get_server_info(hostname=None): """…
AutoClient #settings.py # ————————01CMDB获取服务器基本信息———————— import os BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))##当前路径 # 采集资产的方式,选项有:agent(默认), salt, ssh MODE = 'agent' # ————————01CMDB获取服务器基本信息———————— #settings.py #base.py…
#settings.py """ Django settings for AutoCmdb project. Generated by 'django-admin startproject' using Django 2.0.6. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings…