æåã®æ¹æ³ã¯ãSNMPãªã¯ãšã¹ãã䜿çšããããšã§ããZabbixã¯ãSNMPãªã¯ãšã¹ãã䜿çšããŠéä¿¡ãè¡ããŸãã ãããã£ãŠããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãåŒãåºããŠããŒãããããã»ããµãã¡ã¢ãªãããŒãã§ããŸãã ããã«ããµãŒããŒã¡ãŒã«ãŒã¯ãSNMPãä»ããŠéã®ç¶æ ã«é¢ããå€ãã®æ å ±ãæäŸã§ããŸãã
2ã€ç®ã¯ã ZabbixãšãŒãžã§ã³ãã䜿çšããããšã§ããããã¯ã ç£èŠå¯Ÿè±¡ã·ã¹ãã ã§å®è¡ããŸãã ç£èŠããããã©ã¡ãŒã¿ãŒã®ãªã¹ãã«ã¯ ãCPUã®èªã¿èŸŒã¿ãã¡ã¢ãªäœ¿çšéãªã©ã®åçŽãªãã®ã ãã§ãªããããŒããŒã·ã§ã³ãµããŒãä»ãã®ããã¹ããã°ãã¡ã€ã«ã®èªã¿åããããã¡ã€ã«ãå€æŽããããšããäºå®ã®è¿œè·¡ãªã©ãããªãããŒãªãã®ãå«ãŸããŸãã ã·ã¹ãã äžã®ä»»æã®ã³ãã³ãã®åºåããã©ã¡ãŒã¿ãŒãšããŠäœ¿çšããããšãã§ããŸãã ZabbixãšãŒãžã§ã³ãã®æ©èœã¯ããŒãžã§ã³ããšã«å€§ãããªããŸãã
Zabbixãä»ããŠå¶åŸ¡ãããã®ãZabbixãšãŒãžã§ã³ãæ©èœã®ãªã¹ãã«ãªãå Žåã¯ã©ãããã°ããã§ããïŒ éçºè ã次ã®ãªãªãŒã¹ã§å®è£ ãããŸã§åŸ ã¡ãŸããïŒ å¿ ãããããã§ã¯ãããŸããã
Zabbixã®æ©èœãæ¡åŒµããŠãµãŒããŒãç£èŠããããã®ããã€ãã®æšæºã€ã³ã¿ãŒãã§ãŒã¹ãæ®ãããŠããŸãããæ³ååãšã¹ã¯ãªãããæžãããã®ç©ºãæéãããéãã§ãã ã€ã³ã¿ãŒãã§ãŒã¹ã¯UserParameterãšzabbix_senderã§ãã æåã®1ã€ã«ã€ããŠèª¬æããäŸãšããŠãSMARTããŒããã©ã€ãã®ã¹ããŒã¿ã¹ãåéãã誰ããWindowsãã·ã³ã§æ°ããããã°ã©ã ãã¢ã³ã€ã³ã¹ããŒã«ãŸãã¯ã€ã³ã¹ããŒã«ããã¿ã€ãã³ã°ãç£èŠããæ¹æ³ã瀺ããŸãã
å°ãã®ææ
ãµãŒããŒäžã§ZabbixãšãŒãžã§ã³ããå°ãªããšã1åèšå®ããŠããå Žåã UserParameterã®äœ¿çšãéå§ããã®ã¯é£ãããããŸããã æ°ãããã©ã¡ãŒã¿ãŒãè¿œå ããã«ã¯ãããã€ãã®ããšãè¡ãå¿ èŠããããŸãã
- æ§æãã¡ã€ã«zabbix_agentd.confã®æåŸã«ãã©ãŒã ã®è¡ãè¿œå ããŸã
UserParameter=<>,<>
ããã§ïŒ
<key>ã¯ç¬èªã«äœæããäžæã®ååã§ãã Zabbixã§ããŒã¿ã¢ã€ãã ãèšå®ãããšãã«äœ¿çšããŸãã
<command>ã¯ãç£èŠå¯Ÿè±¡ãã¹ãã§å®è¡ãããã³ãã³ãã§ã ã
ãããŠãããã¯éåžžã«åçŽãªäŸã§ãLinuxã®ãã¹ãŠã®æšæºæ§æã«ãããŸãã
UserParameter=system.test,who|wc -l
ãã®ããã ããŒã¯system.testã§ããã who | wc -lã¯ãã·ã¹ãã å ã®éããŠããã»ãã·ã§ã³ã®æ°ãè¿ããŸãã è¿œå ïŒãŸãã¯ããã®è¡ãæ¢ã«æã£ãŠããå Žåã¯ã³ã¡ã³ã解é€ïŒããŠãå ã«é²ã¿ãŸãã
- Zabbix Webã³ã³ãœãŒã«ã§ã䜿çšããããŒã§æ°ããããŒã¿é ç®ãäœæããŸããäžèšã®äŸã䜿çšããå Žåãããã¯system.testã§ãã
ãããè¡ãã«ã¯ã[ããŒã¿ã¢ã€ãã ã®äœæ]ãã¯ãªãã¯ããŸã
ãããŠãèšå®ãã¡ã€ã«ã§æå®ããããã®ãšåãã㌠ãããã³ZabbixãšãŒãžã§ã³ãã®ã¿ã€ããèšå®ããŸãã
- èšå®ãã¡ã€ã«ã®å€æŽãæå¹ã«ããããã«ZabbixãšãŒãžã§ã³ããåèµ·åããŸã
ææ°ã®ããŒã¿ã§çµæã芳å¯ããŸã ïŒ
UserParameterã«ããSMARTã¢ãã¿ãªã³ã°
äžèšã®äŸã¯ããŸã£ããåãããšãè¡ãæšæºã®ããŒsystem.users.numããã§ã«ååšããããšãèãããšãã»ãšãã©å®çšçã§ã¯ãããŸããã
ããã§ã¯ãããå°ããªã¢ã«ã«èŠããäŸãèŠãŠã¿ãŸãããã
ããŒããã©ã€ãã®å€æŽãèšç»ããææãç£èŠããããšã«é¢å¿ãããå Žåã¯ã2ã€ã®ãªãã·ã§ã³ããããŸãã
- ãã£ã¹ã¯ãããŒããŠã§ã¢RAIDã³ã³ãããŒã©ã®èåŸã«ããå ŽåãååãšããŠããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãã£ã¹ã¯èªäœããèªèãããŸããã ãããã£ãŠããŠãŒãã£ãªãã£ãŸãã¯SNMPãµããšãŒãžã§ã³ããéããŠããŒããã©ã€ãã®ã¹ããŒã¿ã¹ã«é¢ããæ å ±ãååŸããæ¹æ³ãæ¢ããŠããŸãããããã¯ãRAIDã³ã³ãããŒã©ã®è£œé å ã«èŠªåã«æäŸããïŒãŸãã¯æäŸããªãã£ãïŒã ã³ã³ãããŒã©ãŒã®åã ã®ã·ãªãŒãºããšã«ããã®æ å ±ãžã®ç¬èªã®ãã¹ã
- ã¯ãŒã¯ã¹ããŒã·ã§ã³ããœãããŠã§ã¢RAIDãåãããµãŒããŒãªã©ã«ã€ããŠã ã話ããŠããå Žåããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãããã£ã¹ã¯ã«ã¢ã¯ã»ã¹ã§ããããŸããŸãªãŠãŒãã£ãªãã£ã䜿çšããŠãããã®ã¹ããŒã¿ã¹ãèªç±ã«èªã¿åãããšãã§ããŸãã Zabbixã®å Žåã SMARTMONTOOLSããã±ãŒãžã®smartctlãŠãŒãã£ãªãã£ãé©ããŠããŸãã
Debianã§ã¯ãSMARTMONTOOLSãã€ã³ã¹ããŒã«ãããšæ¬¡ã®ããã«ãªããŸãã
sudo apt-get install smartmontools
ãããŠãŠãŒãã£ãªãã£ã¯äœ¿çšããæºåãã§ããŠããŸãã
ã·ã¹ãã äžã®åãã©ã€ãã«ã€ããŠãæåã«SMARTãæå¹ã«ãªã£ãŠããããšã確èªããŸãã
sudo smartctl -i /dev/sda | grep SMART SMART support is: Available - device has SMART capability. SMART support is: Enabled
çªç¶SMARTããã©ã€ãã§ãµããŒããããŠãããããªãã«ãªã£ãŠããå Žåã¯ãã¢ã¯ãã£ãã«ããŸãã
sudo smartctl -s on -S on -o on /dev/sda smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF ENABLE/DISABLE COMMANDS SECTION === SMART Enabled. SMART Attribute Autosave Enabled. SMART Automatic Offline Testing Enabled every four hours.
次ã®ã³ãã³ãã䜿çšããŠãSMARTã®ã¹ããŒã¿ã¹ã確èªã§ããŸãã
sudo smartctl -H /dev/sda |grep "test"| cut -f2 -d: |tr -d " "
ããã¯ã zabbix_agentd.confã«æžã蟌ãã³ãã³ã ã§ãã
UserParameter=uHDD.health,sudo smartctl -H /dev/sda |grep "test"| cut -f2 -d: |tr -d " "
ããã§ãuHDD.healthãããŒã§ãã
Flexible UserParameterã«ããSMARTã¢ãã¿ãªã³ã°
ããã«ããããã£ã¹ã¯ã2ã€ããå Žåã®å¯ŸåŠæ¹æ³ã«ã€ããŠã®åççãªçåãçããŸãã ãã®åé¡ã解決ããæãç°¡åãªæ¹æ³ã¯ã UserParameterããšãŒãžã§ã³ãã«ãã©ã¡ãŒã¿ãŒãæž¡ãæ©èœã§ã ãããã«ã€ããŠã¯ãŸã 説æããŠããŸããã ãããããã¹ãŠã¯éåžžã«ç°¡åã«è¡ãããããã«äŸã§ãïŒ
UserParameter=uHDD.health.[*],sudo smartctl -H /dev/$1 |grep "test"| cut -f2 -d: |tr -d " "
Zabbix Webã€ã³ã¿ãŒãã§ãŒã¹ã®ããŒã§ã¯ããã©ã¡ãŒã¿ãŒã*ã§ã¯ãªãè§æ¬åŒ§ã§çœ®ãæããŸãã ããšãã°ãããããŒã¿é ç®ã«å¯ŸããŠsdaãèšè¿°ããå¥ã®ããŒã¿é ç®ã«å¯ŸããŠsdbãèšè¿°ããŸãã ã³ãã³ãã§ã¯ããã®ãã©ã¡ãŒã¿ãŒã¯å€æ°$ 1ã®äœçœ®ã«åæ ãããŸãã
2çªç®ã®ãã£ã¹ã¯ã®ããŒã¿èŠçŽ ãäœæããŸãã
ãã°ãããããšã ææ°ã®ããŒã¿ã§çµæã確èªã§ããŸãã
äœã¬ãã«ã®ãã£ã¹ã«ããªãŒãåããæè»ãªãŠãŒã¶ãŒãã©ã¡ãŒã¿ãŒã«ããSMARTã¢ãã¿ãªã³ã°
ãã¹ãŠããŸããããŸããã ããããããã§ããã£ã¹ã¯ã2ã€ã§ã¯ãªã22ã§ããå ŽåãåççãªçåãçããŸãã ãããŠããã§ã ãã§ã«èª¬æãã äœã¬ãã«æ€åº ïŒLLDïŒã®çŽ æŽãããæ©äŒãæã«å ¥ããŸãã
äœã¬ãã«ã®æ€åºã«ãããç£èŠã·ã¹ãã ã¯ããããã¯ãŒã¯ããŒãã«ååšããé¡äŒŒã®èŠçŽ ã®æ°ãæ€åºãããã³ãã¬ãŒãã䜿çšããŠãããã®èŠçŽ ã«å¿ èŠãªããŒã¿èŠçŽ ãããªã¬ãŒ ã ã°ã©ããåçã«äœæã§ããŸãã ã·ã¹ãã ã«ã¯ããã¡ã€ã«ã·ã¹ãã ããããã¯ãŒã¯ã€ã³ã¿ãŒãã§ã€ã¹ãSNMP OIDãããã«èŠã€ããããšãã§ããŸãã ãã ããããã§ã¯éçºè ãæšæºæ©èœãè£å®ããæ©äŒãæ®ããŸãããJSON圢åŒã§èŠçŽ ãèŠã€ãã£ããšããæ å ±ãã·ã¹ãã ã«è»¢éããã ãã§ãã ããã䜿çšããŸãã
å°ããªperlã¹ã¯ãªããsmartctl-disks-discovery.plãäœæããŸãã ã·ã¹ãã å ã®ãã¹ãŠã®ãã£ã¹ã¯ãæ€åºãããã®æ å ±ãJSONã§åºåãããã©ã€ãã§SMARTãæå¹ã«ãªã£ãŠãããã©ããã«é¢ä¿ãªãæ å ±ãéä¿¡ããŸãã
#!/usr/bin/perl #must be run as root $first = 1; print "{\n"; print "\t\"data\":[\n\n"; for (`ls -l /dev/disk/by-id/ | cut -d"/" -f3 | sort -n | uniq -w 3`) { #DISK LOOP $smart_avail=0; $smart_enabled=0; $smart_enable_tried=0; #next when total 0 at output if ($_ eq "total 0\n") { next; } print "\t,\n" if not $first; $first = 0; $disk =$_; chomp($disk); #SMART STATUS LOOP foreach(`smartctl -i /dev/$disk | grep SMART`) { $line=$_; # if SMART available -> continue if ($line = /Available/){ $smart_avail=1; next; } #if SMART is disabled then try to enable it (also offline tests etc) if ($line = /Disabled/ & $smart_enable_tried == 0){ foreach(`smartctl -i /dev/$disk -s on -o on -S on | grep SMART`) { if (/SMART Enabled/){ $smart_enabled=1; next; } } $smart_enable_tried=1; } if ($line = /Enabled/){ $smart_enabled=1; } } print "\t{\n"; print "\t\t\"{#DISKNAME}\":\"$disk\",\n"; print "\t\t\"{#SMART_ENABLED}\":\"$smart_enabled\"\n"; print "\t}\n"; } print "\n\t]\n"; print "}\n";
èµ·åãããšãã¹ã¯ãªããã¯ä»¥äžãçæããŸãã
$ /usr/local/bin/smartctl-disks-discovery.pl
{ "data":[ { "{#DISKNAME}":"md0", "{#SMART_ENABLED}":"0" }, { "{#DISKNAME}":"md1", "{#SMART_ENABLED}":"0" }, { "{#DISKNAME}":"sda", "{#SMART_ENABLED}":"1" }, { "{#DISKNAME}":"sdb", "{#SMART_ENABLED}":"1" }] }
ããã§ãã¹ã¯ãªãããZabbixã«ãã£ãŠèªåçã«èµ·åãããããã«ããããã«ããã1ã€ã®UserParameterãzabbix_agentd.confã«è¿œå ããã ãã§ã ã
UserParameter=uHDD.discovery,sudo /usr/local/bin/smartctl-disks-discovery.pl
æ§æãå®äºããããWebã€ã³ã¿ãŒãã§ã€ã¹ã«ç§»åããsmartctlã®æ°ããæ€åºã«ãŒã«ãäœæããŸãã
ããŒãšãã£ã«ã¿ãŒã«æ³šæããŠãã ããïŒ{#SMART_ENABLED} = 1ïŒåŸè ã®ãããã§ãSMARTããµããŒãããæ€åºããããã©ã€ãã®ã¿ãè¿œå ãããŸãã ããã§ããã©ã€ãåããã¯ã{#DISKNAME}ã«çœ®ãæããã ãã§ãsdaããã³sdbãã©ã€ãã®2ã€ã®ããŒã¿é ç®ã1ã€ã®ãããã¿ã€ãããŒã¿é ç®ã«æžãæããããšãã§ããŸãã
æåŸã«ãZabbixãzabbix_agentd.confã«ã«ãŒããšããŠç»é²ããã³ãã³ããå®è¡ããŠSMARTãç£èŠããåã«ããã¹ã¯ãŒããå ¥åããã«ãã®ã³ãã³ããå®è¡ãããŠãŒã¶ãŒã®ã¢ã¯ã»ã¹èš±å¯ãè¿œå ããå¿ èŠããããŸãããã®ããã/ etc / sudoersã«æ¬¡ã®è¡ãè¿œå ããŸãã
zabbix ALL= (ALL) NOPASSWD: /usr/sbin/smartctl,/usr/local/bin/smartctl-disks-discovery.pl
SMARTã¢ãã¿ãªã³ã°çšã®å®æãããã³ãã¬ãŒãããããªã¬ãŒãšãã®ããã«æ§æãããæ§æã䜿çšããŠãæ®ãã®ããŒã¿èŠçŽ ãšãšãã«é©çšããŸãã
Windowsã§ã®æ°ããããã°ã©ã ã®ã€ã³ã¹ããŒã«ã®å¶åŸ¡
Windowsã«ã€ã³ã¹ããŒã«ãããZabbixãšãŒãžã§ã³ãã¯UserParameterãä»ããŠå±éããããšãã§ããŸãããã³ãã³ãã®ã¿ãç°ãªããŸãã ããšãã°ãsmartctlã¯ã¯ãã¹ãã©ãããã©ãŒã ãŠãŒãã£ãªãã£ã§ãããWindowsã®ããŒããã©ã€ããå¶åŸ¡ããããã«ã䜿çšã§ããŸãã
å¥ã®äŸãç°¡åã«èããŠã¿ãŸãããã ã¿ã¹ã¯ã¯ããŠãŒã¶ãŒãèªåã§ããã°ã©ã ãã¢ã³ã€ã³ã¹ããŒã«ãŸãã¯ã€ã³ã¹ããŒã«ãããã³ã«éç¥ãåãåãããšã§ãã
ãããè¡ãã«ã¯ãvbsã¹ã¯ãªããã䜿çšããŸãã
uDiffPrograms.vbs
'KNOWN ISSUE: If Application name conatins '-' symbol then e-mail alert containing software list will be sent all on one line instead of each packet on a single line variable=InstalledApplications(".") 'WScript.Echo strConvert(variable,"Windows-1251","cp866") Const ForReading = 1 zabbix_dir="C:\zabbix\" Set objFSO = CreateObject("Scripting.FileSystemObject") 'Create old file if does not exist If objFSO.FileExists(zabbix_dir&"uDiffPrograms_old.txt")=0 Then Set objFile4 = objFSO.CreateTextFile(zabbix_dir&"uDiffPrograms_old.txt") objFile4.WriteLine variable objFile4.Close Call ConvertCharsetFile("0x0") WScript.Quit End if 'Create 'new' file Set objFile3 = objFSO.CreateTextFile(zabbix_dir&"uDiffPrograms_new.txt") objFile3.WriteLine variable objFile3.Close 'Compare old and new files Set objArgs = Wscript.Arguments Set objFile5= objFSO.GetFile(zabbix_dir&"uDiffPrograms_new.txt") Set objFile6 = objFSO.GetFile(zabbix_dir&"uDiffPrograms_old.txt") If objFile5.Size <> objFile6.Size Then ' Wscript.Echo "The file is different." Else 'Wscript.Echo "They are the same." objFSO.DeleteFile zabbix_dir&"uDiffPrograms_new.txt" Call ConvertCharsetFile("0x0") WScript.Quit End If 'Search for removed applications Set objFile2 = objFSO.OpenTextFile(zabbix_dir&"uDiffPrograms_old.txt", ForReading) Do Until objFile2.AtEndOfStream strAddress2 = objFile2.ReadLine If InStr(variable, strAddress2&vbCrLf) = 0 Then strNotCurrent2 = strNotCurrent2 & strAddress2 & vbCrLf End If Loop objFile2.Close 'Search for installed applications Set objFile1 = objFSO.OpenTextFile(zabbix_dir&"uDiffPrograms_old.txt", ForReading) oldvar = objFile1.ReadAll objFile1.Close objFSO.DeleteFile zabbix_dir&"uDiffPrograms_old.txt" Set objFile2 = objFSO.OpenTextFile(zabbix_dir&"uDiffPrograms_new.txt", ForReading) Do Until objFile2.AtEndOfStream strAddress = objFile2.ReadLine If InStr(oldvar, strAddress&vbCrLf) = 0 Then strNotCurrent = strNotCurrent & strAddress & vbCrLf End If Loop objFile2.Close 'Rename C:\zabbix\uDiffPrograms_new.txt to C:\zabbix\uDiffPrograms_old.txt objFSO.MoveFile zabbix_dir&"uDiffPrograms_new.txt" , zabbix_dir&"uDiffPrograms_old.txt" 'Output if strNotCurrent <> "" and strNotCurrent2 <> "" then Call ConvertCharsetFile(" :" & vbCrLf & strNotCurrent & vbCrLf & " :" & vbCrLf & strNotCurrent2) Wscript.Quit End if if strNotCurrent <> "" then Call ConvertCharsetFile(" :" & vbCrLf & strNotCurrent) End if if strNotCurrent2 <> "" then Call ConvertCharsetFile(" :" & vbCrLf & strNotCurrent2) End If Function InstalledApplications(node) '''with Versions Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE Set oRegistry = GetObject("winmgmts://" _ & node & "/root/default:StdRegProv") sBaseKey = _ "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys) For Each sKey In arSubKeys iRC = oRegistry.GetStringValue( _ HKLM, sBaseKey & sKey, "DisplayName", sValue) If iRC <> 0 Then oRegistry.GetStringValue _ HKLM, sBaseKey & sKey, "QuietDisplayName", sValue End If If sValue <> "" and instr(sValue, "KB")=0 Then 'instr(sValue, "KB")=0 - to exlude KB-indexed Microsoft Patches If instr(InstalledApplications, sValue&vbCrLf)=0 then 'and instr(InstalledApplications, sValue&vbCrLf)=0 - to exlude possible dublicates InstalledApplications = _ InstalledApplications & sValue & vbCrLf End If End If Next End Function Function ConvertCharsetFile(input) Const adTypeBinary = 1 Const adTypeText = 2 Const bOverwrite = True Const bAsASCII = False 'Write to temp file Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists( zabbix_dir&"uDiffPrograms_temp.txt" ) Then objFSO.DeleteFile zabbix_dir&"uDiffPrograms_temp.txt" Set objFile3 = objFSO.CreateTextFile(zabbix_dir&"uDiffPrograms_temp.txt") objFile3.WriteLine input objFile3.Close Dim oFS : Set oFS = CreateObject( "Scripting.FileSystemObject" ) Dim sFFSpec : sFFSpec = oFS.GetAbsolutePathName( zabbix_dir&"uDiffPrograms_temp.txt" ) Dim oFrom : Set oFrom = CreateObject( "ADODB.Stream" ) Dim sFrom : sFrom = "windows-1251" Dim oTo : Set oTo = CreateObject( "ADODB.Stream" ) Dim sTo : sTo = "utf-8" oFrom.Type = adTypeText oFrom.Charset = sFrom oFrom.Open oFrom.LoadFromFile sFFSpec oTo.Type = adTypeText oTo.Charset = sTo oTo.Open oTo.WriteText oFrom.ReadText oFrom.Close If oFS.FileExists( sFFSpec ) Then oFS.DeleteFile sFFSpec oTo.SaveToFile sFFSpec oTo.Close End Function '=============================================================================
Zabbixãšçµ±åããã«ã¯ãèšå®ãã¡ã€ã«ã«UserParameterãè¿œå ããŸãã
UserParameter=uDiffPrograms, cscript.exe /nologo "C:\zabbix\uDiffPrograms.vbs" & type C:\zabbix\uDiffPrograms_temp.txt
Windowsã®ãã³ãã¬ãŒãã«ããŒã¿é ç®ãè¿œå ããŸãã
ããªã¬ãŒãè¿œå ããŸãã
ãããŠãé»åã¡ãŒã«éç¥ãéä¿¡ããã¢ã¯ã·ã§ã³ ïŒ
ç£èŠããã»ã¹å šäœã¯æ¬¡ã®ããã«ãªããŸããZabbixã¹ã¯ãªããã¯ãçŸåšãšåã®2ã€ã®ããã°ã©ã ãªã¹ããæ¯èŒãããšãŒãžã§ã³ãã«ãã£ãŠæ¯æéèµ·åãããŸãã 次ã«ãã¹ã¯ãªããã¯ãã¹ãŠã®å€æŽãå¥ã®ãã¡ã€ã«ã«æžã蟌ã¿ãŸãã å€æŽããªãå Žåããã¡ã€ã«ã«0x0ãæžã蟌ãŸããŸã
ãã¡ã€ã«ã®å 容ã¯ZabbixãµãŒããŒã«éããã uDiffProgramms ããŒã¿é ç®ã®å€ã 0x0以å€ã®å Žåã«ããªã¬ãŒãçºçããŸãã 次ã«ãå¥ã®ã¢ã¯ã·ã§ã³ãããã®ã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãŸãã¯åé€ããããã®ã®ãªã¹ããå«ãéç¥ãã¡ãŒã«ã§éä¿¡ããŸãã
æåŸã«
UserParameter㯠ãã·ã¹ãã ã®æ©èœãèªåã§æ¡åŒµããããã®åªããç°¡åãªæ¹æ³ã§ãã èšåãã䟡å€ã¯ãããŸãïŒ zabbix_senderãããšãã°ãã¹ã±ãžã¥ãŒã«ã«åŸã£ãŠïŒ UserParameterã®ããã«ïŒã§ã¯ãªããäœããã®ã€ãã³ãã«åŸã£ãŠãZabbixã«ããŒã¿ãéä¿¡ããå¿ èŠãããå Žåã«é©ããŠããŸãã System.run [] ãããã¯UserParameterã«äŒŒãŠããŸããããã¹ãŠã®ãšãŒãžã§ã³ãæ§æãå€æŽããå¿ èŠããªããšããç¹ã§ãã䟿å©ã§ããã®ããŒã¿é ç®ããã³ãã¬ãŒãã«è¿œå ããã ãã§ãã ããã«ãZabbix 2.2ã®æ¬¡ã®ã¡ãžã£ãŒãªãªãŒã¹ã§ã¯ããšãŒãžã§ã³ãã®æ©èœãæ¡åŒµãããã1ã€ã®æ°ããæ¹æ³ããã©ã°ã€ã³ã§ãã 楜ãã¿ã«ããŠããŸãïŒ
ãã®ãããã¹ã¯ãªãããŸãã¯ã³ãã³ãã䜿çšããŠã·ã¹ãã ã«ã€ããŠäœããåŠã¹ãå Žåããã€ã§ãZabbixã«æž¡ãããšãã§ãããšèããŠãã ããã