Hunter的大杂烩 技术学习笔记

2014-09-02

安装ganglia/nagios集成插件

Filed under: 技术话题 — hunter @ 3:54 pm

url:https://github.com/ganglia/monitor-core/wiki/Integrating-Ganglia-with-Nagios

其中 ganglia-nagios-bridge 需要安装 argparse 模块:

easy_install argparse

check_ganglia_metric 需要 安装NagAconda 模块 或者直接执行 easy_install ceck_ganglia_metric

btw:怎么都没搞定这个check_ganglia_metric的cache问题,回头继续搞 ganglia python client

2014-09-01

gmond的神奇特性

Filed under: 技术话题 — hunter @ 7:00 pm

如果在配置gmond.conf时,没有使用多播,那么必须把自己的ip加入到send_channel里面,否则 gmond不会感知本机的数据!

udp_send_channel {
#bind_hostname = yes # Highly recommended, soon to be default.
# This option tells gmond to use a source address
# that resolves to the machine’s hostname.  Without
# this, the metrics may appear to come from any
# interface and the DNS names associated with
# those IPs will be used to create the RRDs.
#mcast_join = 239.2.11.71
  host = 192.168.1.1

port = 28649
ttl = 1
}

Centos 6.2 下ganglia安装注意事项

Filed under: 技术话题 — hunter @ 6:39 pm

主要是selinux搞的鬼,大致需要调整以下配置:
1. chcon -t httpd_sys_content_t -R /usr/local/ganglia/ganglia-web
chown apache:apache -R /usr/local/ganglia/ganglia-web
chmod 777 /usr/local/ganglia/ganglia-web/dwoo/*

(more…)

2014-05-14

自定义彩铃工具

Filed under: 技术话题 — hunter @ 12:34 pm

文本转语音,并可保存为文件: http://tingdu.rmjd.net/
超强的在线音频编辑站,可合并、剪接音频 http://audio-joiner.com/

2014-05-07

统计最近一个月outlook发件人vba

Filed under: 技术话题 — hunter @ 12:35 pm

Function getDateInt(dateStr) As Long

getDateInt = 0
pos1 = InStr(dateStr, “/”)
If pos1 > 0 Then
pos2 = InStr(pos1 + 1, dateStr, “/”)
If pos2 > 0 Then

yearInt = Left(dateStr, pos1 – 1)
monthInt = Mid(dateStr, pos1 + 1, pos2 – pos1 – 1)
dayInt = Right(dateStr, Len(dateStr) – pos2)
getDateInt = yearInt * 10000 + monthInt * 100 + dayInt

End If
End If
End Function

Sub MTest()
Dim BodyFile As String
Dim olMailItem As MailItem
Dim rMailItem As MailItem
Dim myComments As String
Dim myOlSel As Outlook.Selection

Dim subj As String
myComments = “___OK____: ”

Set myOlSel = Application.ActiveExplorer.Selection
For i = 1 To myOlSel.Count
Set olMailItem = myOlSel.Item(i)
Debug.Print olMailItem.CreationTime & “|” & olMailItem.SenderName & “|” & olMailItem.Subject
createDateTimeStr = olMailItem.CreationTime
pos = InStr(createDateTimeStr, ” “)
If pos > 0 Then
createDateStr = Left(createDateTimeStr, pos)
dateInt1 = getDateInt(createDateStr)
dateInt2 = getDateInt(“2014/4/7”)
If dateInt1 = 0 Then
Exit For
End If
If dateInt1 < dateInt2 Then Exit For End If 'If StrComp(createDateStr, "2014/4/7") < 0 Then ' Exit For 'End If End If Next Set rMailItem = Nothing Set olMailItem = Nothing End Sub

« Newer PostsOlder Posts »

Powered by WordPress