[Zabbix] Citrix Xenserver 监控
来源:互联网 发布:在淘宝网能买汽车吗 编辑:程序博客网 时间:2024/05/24 16:15
一、SNMP方式监控
1、xenserver开启SNMP
#参考http://www.fucking-it.com/articles/xenserver/50-xenserver-snmp-installation
- Change the name of SNMP community VegetaRocks to the desired name
- Change the IP for the IP address of your device.
# vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m conntrack --ctstate NEW -m udp -p udp --dport 161 -j ACCEPT
Add the above line before the lines below:
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
Restart the iptables firewall service through the command below.
# service iptables restart
Edit the SNMP configuration file on your server with the command below.
# vi /etc/snmp/snmpd.conf
Locate and change the public community in the line below.
com2sec notConfigUser default public
To the name of a desired community.
com2sec notConfigUser default VegetaRocks
Execute the following commands to restart the SNMP and configure SNMP to start automatically with your computer.
# service snmpd restart
# chkconfig snmpd on
On a Linux computer, install the snmpwalk utility and test the SNMP configuration using the following commands.
# apt-get install snmp
# snmpwalk –v1 –c VegetaRocks 10.10.10.10
CONCLUSION
This tutorial presented the SNMP service installation process on a Xenserver..
2、WEB端配置
二、MonitoringCitrix XENSERVER Host and VMs based on Python XENApi
参考:https://share.zabbix.com/cat-app/cluster/monitoring-citrix-xenserver-host-and-vms-based-on-pyton-xenapi
Following steps on zabbix server or zabbix proxy
1. Download Pyton XENApi.py from https://github.com/xapi-project/xen-api/tree/master/scripts/examples/python. Please use the last version, becaus of ssl support changes in pyton
2. Copy file XENApi.py to directory /usr/local/lib/python
If you want to change, please change line sys.path.append('/usr/local/lib/python') also!
3. Copy citrix.xenserver.py from attached archive to you externel script path and set userrights (chmod 755).
4. Import the templates
zbx_template_xenserver_host.xml -->Monitoring XEN Host
zbx_template_xenserver_vm.xml --> Monitoring XEN VMs
Please note, the the name in zabbix and the name in xen have to be the same!
5. Set macros (Global on on all host you use this templates)
{$XENMASTER} -->Masterserver of XENCLUSTER
{$XENUSERNAME} --> Username for connect to XENCLUSTER
{$XENPASSWORD} --> Password for connect to XENCLUSTER
Important note:
If you test this script by executing as root it will be created an cachefile as user root. So, if zabbix later start this script as user user zabbix or www-data, the old cache file (creates by user root) can not open for writing. This script will exit with error!!!!!!!!!
Used python modules in citrix.xenserver.py:
import urllib2
import xml.dom.minidom
import sys, time
import itertools
import re
import shutil
import ssl
import getopt
import os
import fcntl
import logging
import logging.handlers
Used python modules in XemAPI.py:
import gettext
import xmlrpclib
import httplib
import socket
import sys
- [Zabbix] Citrix Xenserver 监控
- Citrix XenServer Tools作用
- Xen、Citrix XenServer、XCP
- Citrix XenServer版本演变
- Citrix 服务器虚拟化之十三 Xenserver虚拟机内存优化与性能监控
- Citrix XenServer网络性能优化
- Citrix XenServer体系架构解析
- Citrix Xenserver之二安装Xenserver 5.6 SP2
- citrix XenServer 将XenServer加入域时报错
- 详解Citrix思杰XenServer虚拟化
- Citrix Xenserver 6 安装注册激活步骤
- Citrix Xenserver 6 安装注册激活步骤
- Citrix XenServer iscsi SR 无法连接
- Citrix Xenserver 6 安装注册激活步骤
- Citrix XenServer安装及增加硬盘
- Citrix Xenserver 6 license激活三步骤
- Zabbix监控
- Zabbix监控
- Graph Valid Tree
- BBC推自家新字体:小屏幕更易读、还省下了授权费
- LaTex表格内单元格内容强制换行
- 上课笔记
- java学习之简单工厂模式
- [Zabbix] Citrix Xenserver 监控
- 学习Linux系统的几点建议
- (POJ
- Python爬虫入门:Urllib parse库使用详解(二)
- Android 之多种网络请求实现方式
- 神经机器翻译(Neural Machine Translation)系列教程
- HDU3091 Necklace 【状压】
- Anko
- 使用 Crossfilter 和 dc.js 构建交互式报表