??????????????ganglia???????????
???????????? ???????[ 2014/3/26 15:26:14 ] ?????????????? ??????? ???????
????ganlia ?? nagios ????????????????澯???????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
???????????????н??????????n??????????????????????????????????????????澯???????????????Nagios?????????????
????GEngin.py??????????棬????conf??????????????????????????????gmetric?????
????conf?????б???metrix????????????ò??????
????flag?????н????????flag????????????????????????????????????????????????????
????log?? ???м??GEngin??log????????????????log
????pid?? GEngin??pid ??澯??????
????script?? ??????????????
????cat conf/metrix.cfg:
YARN|ResourceManager|cpu|ResourceManager_cpu.py|ResourceManager_cpu.txt|int16|Percent|
YARN|ResourceManager|mem|ResourceManager_mem.py|ResourceManager_mem.txt|int16|Percent|
YARN|ResourceManager|lsof|ResourceManager_lsof.py|ResourceManager_lsof.txt|int16|Number|
????ls flag/:
????yarntestD001.flag
????ll log/:
-rw-r--r-- 1 yarn users 168 Mar 19 20:02 yarntestD001_YARNResourceManagercputdw-10-16-19-91.txt
-rw-r--r-- 1 yarn users 168 Mar 19 20:02 yarntestD001_YARNResourceManagerlsoftdw-10-16-19-91.txt
-rw-r--r-- 1 yarn users 168 Mar 19 20:02 yarntestD001_YARNResourceManagermemtdw-10-16-19-91.txt
????ll script/:
-rw-r--r-- 1 yarn users 882 Feb 28 17:20 ResourceManager_cpu.py
-rw-r--r-- 1 yarn users 1093 Feb 28 17:45 ResourceManager_lsof.py
-rw-r--r-- 1 yarn users 882 Feb 28 17:18 ResourceManager_mem.py
????cat script/SAMPLE.py:
#!/usr/bin/env python
# coding=gbk
import sys
import os
import datetime
import time
def CheckInput():
"Check Input parameters ?? they should be a pysql file."
if len(sys.argv) < 2 :
print "Usage: " + sys.argv[0] + " FileNamePrefix "
sys.exit()
if __name__== '__main__':
CheckInput() # check parameter and asign PyFileName
## result file log to directory of LOG
LogFile = open("log/"+sys.argv[1]??'a')
res = "29"
## Interface to Gmetrix ??must be value:Value
print "value:"+res
ntime = str(time.strftime("%Y-%m-%d %X"??time.localtime()))
LogFile.write(ntime+" "+res+"
")
LogFile.close()
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11