Posts by 4Aiur:
Binding Multiple IP Addresses on the Same Network Interface
Binding Multiple IP Addresses on the Same Network Interface
Add new address
sudo ifconfig en1 alias 192.168.2.2 netmask 255.255.255.0
sudo ifconfig en1 alias 192.168.3.3 netmask 255.255.255.0
sudo ifconfig en1 alias 192.168.4.4 netmask 255.255.255.0
sudo ifconfig lo0 alias 127.0.0.2
Remove alias address
sudo ifconfig en1 remove 192.168.2.2 netmask 255.255.255.0
sudo ifconfig en1 192.168.3.3 netmask 255.255.255.0 delete
sudo ifconfig en1 192.168.4.4 netmask 255.255.255.0 -alias
sudo ifconfig lo0 -alias 127.0.0.2
Installing Logster on CentOS
Installing Logster on CentOS Install EPEL repository sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-6.noarch.rpm yum update # This takes quite a while for a fresh install Setting locale cat >> ~/.bash_profile Install Dependence yum -y install logcheck logcheck dependencies: liblockfile lockfile-progs perl-IPC-Signal perl-Proc-WaitStat perl-mime-construct Install logster git clone git://github.com/etsy/logster.git cd logster make install dry run /usr/sbin/logster –output=stdout SampleLogster […]
Installing and Configuring Graphite on CentOS
Installing and Configuring Graphite on CentOS Install EPEL repository sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo yum -y update # This takes quite a while for a fresh install Alternatively: wget -r -l1 –no-parent -A “epel*.rpm” http://dl.fedoraproject.org/pub/epel/6/x86_64/ sudo yum -y –nogpgcheck localinstall */pub/epel/6/x86_64/epel-*.rpm Install Dependences sudo yum -y install gcc.x86_64 git.x86_64 python-devel pyOpenSSL \ python-memcached bitmap bitmap-fonts […]
JMX monitoring
JMX monitoring dataflow java app -> jmxagent -> jmxtrans -> jmx_output.log -> alert.sh -> send mail java app -> jmxagent -> Configuration jmx agent with authentication JMX dynamically allocated random port, and it will bind the port at internal address. If you connecting jmx through firewall or your servers on Amazon EC2, maybe can’t connect […]
Suppressing paramiko log
Suppressing paramiko log Backup paramiko source file. cd /usr/local/lib/python2.7/site-packages/ cp -p paramiko/util.py{,.bak} Modify paramiko/util.py. diff paramiko/util.py{,.bak} 265c265 return True Set logger name "suppress" in your code. self.client = SSHClient() self.client.set_log_channel(‘suppress’)
Zenoss Core setup guide
Zenoss Core setup guide Zenoss Core is a powerful monitoring system, and it is a OpenSource software. Install Zenoss Core Install ZenPacks Setup snmp and snmpd config Add user command Add a single device Add custom Device Class Custom new class properties Setup Processes Custom Zenoss reports Install Zenoss Core Before you install: 1) Run […]
CentOS安装与使用ipmitool
CentOS安装与使用ipmitool ipmitoool可以方便的查看设备硬件状态,建议设备在安装好系统后安装一下ipmitool 安装方法: 安装程序包 yum -y install OpenIPMI.x86_64 OpenIPMI-tools.x86_64 OpenIPMI-libs.x86_64 ipmitool.x86_64 添加ipmi module modprobe ipmi_si modprobe ipmi_devintf modprobe ipmi_msghandler 查看module是否成功添加 lsmod | grep -i ipmi ipmi_si 77900 0 ipmi_devintf 44688 0 ipmi_msghandler 73176 2 ipmi_si,ipmi_devintf 查看系统事件日志命令 ipmitool -I open sel list 1 | 09/02/2010 | 04:10:26 | OEM #0x02 | 2 | 09/02/2010 | 04:10:29 […]
手动升级wordpress的方法
手动升级wordpress的方法 进入到wordpress的后台管理发现有新版本更新时,使用系统自带的自动更新,总是出现300秒超时导致升级失败。 Downloading update from http://wordpress.org/wordpress-3.1.1.zip… Download failed.: Operation timed out after 300 seconds with 1340586 bytes received Installation Failed 使用terminal登陆到系统使用wget测试下载速度,发现服务器下载wordpress包的速度其慢无比,每秒只有3KB左右的速度。 # wget http://wordpress.org/wordpress-3.1.1.zip –2011-04-06 15:01:31– http://wordpress.org/wordpress-3.1.1.zip Resolving wordpress.org… 72.233.56.138, 72.233.56.139 Connecting to wordpress.org|72.233.56.138|:80… connected. HTTP request sent, awaiting response… 200 OK Length: unspecified [application/zip] Saving to: `wordpress-3.1.1.zip’ [ ] 17,114 3.70K/s 解决方法: 首先进入webserver的跟目录,然后手工下载wordpress的安装包,之后修改/etc/hosts的内容把wordpress.org的地址指到本地。 # […]
Cacti配置流程
Cacti配置流程 Cacti是一个简单直观的监控工具,后台使用rrdtool记录监控数据,虽然功能较少,但是图形显示效果比较好看、直观、配置也比较方便,当需要有复杂的监控需求时,可以使用zabbix或者nagios来做。 这里主要讲的是Cacti两方面的配置,一个是添加设备,另外一个是配置权限 添加监控设备 首先需要在被监控的设备上安装与配置snmp agent,Linux平台请参考Linux安装与配置Snmpd,OpenSolaris参考OpenSolaris net-snmp install script,windows安装配置snmp agent方法 检查是否存在SNMP Service,需要将此服务启动。我的电脑-管理-服务-SNMP Ssrvice. 单击属性-安全,添加发送身份验证陷阱。添加在cacti中的SNMP Community,在下面添加监控端的IP地址 如果没有此服务,通过控制面板-添加组件-管理和监视工具-简单网络管理协议。 添加设备 登陆Cacti后点击面板左侧的devices后点击右侧面板的Add,之后填写Description, Hostname, Host Template(Linux与Solaris使用ucd/net SNMP Host,Windows使用windows2000/xp Host), 其他部分可以使用自己的值来填写"SNMP Community"或者保持不变。配置完成后点击Create增加此设备。 在创建完毕后出现的页面中点下Query Verbose 来测试下snmp数据抓取是否正常。 添加图像 点击页面中的"Create Graphs for this Host" 选中所有复选框后点击"Create",完成生成图像的设置 设置图像数 点击面板左侧的"Graph Trees" –> "Add",输入name后"Create" –> "Save" 把设备添加到心的图像树中 在"Devices"中选中刚加入的设备选择 "Place on a Tree" –> "Go" –> "Continue",到这里设备的配置已经完成,可以点击导航栏的graphs查看新增加设备的各种监控图像,下面是我Cacti监控数据的两个截图 权限配置 增加新用户 […]
Linux安装与配置Snmpd
Linux安装与配置Snmpd 下面是两个主流的Linux,CentOS与Ubuntu的snmpd安装与自动配置脚本 Script on CentOS #!/usr/bin/bash # Install snmp and agent yum install -y net-snmp net-snmp-utils # Backup snmpd.conf mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf-date +%Y%m%d%H%M%S # Write new snmpd config cat > /etc/snmp/snmpd.conf (configure /etc/snmp/snmp.local.conf) disk / 20% EOF chkconfig snmpd on /etc/init.d/snmpd restart Script on Unbuntu #!/usr/bin/bash # Install snmp and agent apt-get -y install snmpd […]