Zabbix 监控 Esxi 主机

环境:

Zabbix 5.08

ESXI 6.7.0

  1. 先配置esxi 主机,在管理-系统-高级设置,找到键:Config.HostAgent.plugins.solo.enableMob,然后将其设置为true


  2. 获取UUID

    浏览器访问:https://esxi_ip/mob/?moid=ha-host&doPath=hardware.systemInfo


  3. 配置Zabbix


  4. 配置宏

{$PASSWORD} —————-密码

{$URL}————————–地址:https://esxi_ip/sdk

{$USERNAME}—————账户

此处账户密码可以在esxi 上建立一个只读账户。

  1. 模板,推荐:Template VM VMware 和 Template VM VMware Hypervisor

最后保存更新。注意,这种模式 可用性 的状态按钮都是灰色的。因为之前选的是客户端模式。

稍等片刻后,查看主机最新信息,可以看到所有的监控信息。

Django 使用mariadb

  1. 修改settings
DATABASES = {
'default': {
     'ENGINE': 'django.db.backends.mysql',
     'NAME': '数据库名字',
     'USER': '数据库用户',
     'PASSWORD': '数据库密码',
     'HOST': '127.0.0.1',
     'PORT': '3306',
     'OPTIONS': {
         'charset' : 'utf8',
         'use_unicode' : True,
#        'autocommit': True,
          }
}
}
2. 修改__init__.py
import pymysql
pymysql.install_as_MySQLdb()

ubuntu22.04 源

阿里源

 

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

 

中科大源

 

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

 

网易 163 源

 

deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse