版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
zabx自動化線上實(shí)戰(zhàn)》基礎(chǔ)篇第2講基于saltstack自動化部署x 端實(shí)zabbix版本:3.0.3三、zbbxsever(lat-ser)Saltstackepel四、salt的安裝#rpmivh2、安裝master并修改配置文件啟動:#yuminstallsalt-master-#vim#/etc/init.d/salt-masterstart#yuminstallsalt-minion-#vim#/etc/init.d/salt-minionsalt-keyLsalt-minionldebugAcceptedKeys:DeniedKeys:UnacceptedRejected#salt'monitor'test. (表示成功五、配置批量管理(在mastr上操作#vim/etc/salt/master #mkdir#mkdir#cd/srv/salt/#lspillartop.slszabbix#tree.├──│├──│└──├──└──├──│├──zabbix-│├──│└──├──├──├──└──#cattop.sls (定義所有的主機(jī)只是sls的時候去zabbix #cdzabbix/#filesfile.slsinit.slsinstall.slsserver.sls#catinit.sls #catinstall.slsname:/tmp/zabbix-unless:test-e/tmp/zabbix-3.0.3.tar.gz#(檢 下是否有這個文件source:salt://zabbix/files/zabbix-3.0.3.tar.gz#(沒有的話從 cwd: #(切換到 tarzxvfzabbix- #(解壓zabbixunless:test-d/tmp/zabbix- file: name:-uid:createhome:gid_from_name:s: #-curl-cwd:/tmp/zabbix-./configure--with-net-snmp--with-libcurl--enable-agent--make #(完成解壓和依賴包之后才執(zhí)行這步操作cmd:pkg:unless:test-d#cat name: #(查看是否有這個文件user:mode:source: #(沒有從 temte: 量#catserver.slsname:user:mode:source:salt://zabbix/files/zabbix_agentd name:enable:reload:file:#cd/srv/salt/pillar/#lsfile.slstop.sls#cattop.sls-#catserver: #cd/srv/salt/zabbix/files/#lszabbix-3.0.3.tar.gzzabbix_agentdzabbix_agentd.conf11、zabbix_agentd啟動文件:#cat #Startsthezabbix_agentddaemon#chkconfig:-95#description:ZabbixMonitoringAgent#processname:zabbix_agentd#pidfile:#ModifiedforZabbix2.0.0#May2012,ZabbixSIA#Sourcefunctionprog="ZabbixAgent"if[!-x${ZABBIX_BIN}];echo-n"${ZABBIX_BIN}notinstalled!"#ltheuserthishasskippedexitstart(){echo-n$"Starting$prog:}stop()}
[$RETVAL-eq0]&&touch/var/lock/subsys/zabbix_agentdecho-n$"Stop$prog:"killproc$ZABBIX_BIN[$RETVAL-eq0]&&rm-f/var/lock/subsys/zabbix_agentdcase"$1"in
sleep10if[-f/var/lock/subsys/zabbix_agentd];then
echo$"Usage:$0{condrestart|start|stop|restart|reload|status}"exit1exit[root@xiaoluofiles]#cat#ThisisaconfigurationfileforZabbixagentdaemon(Unix)#TogetmoreinformationaboutZabbix,visithtt############GENERALPARAMETERS###Option: NameofPIDfile.#Mandatory:no#Default:####Option: Specifieswherelogmessagesarewrittento: system-syslog -filespecifiedwithLogFile console-standardoutput#Mandatory:no#Default:####Option: LogfilenameforLogType'file'parameter.#Mandatory:no#Default:####Option:LogFileSize#umsizeoflogfilein#0-disableautomaticlogrotation.#Mandatory:no#Range:0-1024#Default:####Option: Specifiesdebug 0-basicinformationaboutstartingandstopofZabbixprocesses 1-criticalinformation 2-error 3- 4-fordebugging(produceslotsof 5-extendeddebugging(producesevenmoreinformation)#Mandatory:no#Range:0-5#####Option: SourceIPaddressforoutgoingconnections.#Mandatory:no#Default:#### WhetherremotecommandsfromZabbixserverareallowed. 0-notallowed 1-allowed#Mandatory:no#Default: ### Enableloggingofexecutedscommandsaswarnings. 0-disabled 1-enabled#Mandatory:no#Default: #####Passivechecksrelated###Option:Server ListofcommadelimitedIPaddresses(orhostnames)ofZabbix ingconnectionswillbeacceptedonlyfromthehostslisted IfIPv6supportisenabledthen'127.0.0.1','::127.0.0.1','::ffff:127.0.0.1'aretreatedequally.##Mandatory:no#Default:#Server={{pillar['server']}}###Option:ListenPort Agentwilllistenonthisportforconnectionsfromtheserver.#Mandatory:#Range:1024-#####Option: ListofcommadelimitedIPaddressesthattheagentshouldlisten FirstIPaddressissenttoZabbixserverifconnectingtoittoretrievelistofactivechecks.##Mandatory:no#Default:####Option: Numberofpre-forkedinstancesofzabbix_agentdthatprocesspassive Ifsetto0,disablespassivechecksandtheagentwillnotlistenonanyTCPport.#Mandatory:no#Range:0-100#Default:######Activechecksrelated###Option:ServerActive ListofcommadelimitedIP:port(orhostname:port)pairsofZabbixserversforactive Ifportisnotspecified,defaultportis IPv6addressesmustbeenclosedinsquarebracketsifportforthathostis Ifportisnotspecified,squarebracketsforIPv6addressesare Ifthisparameterisnotspecified,activechecksare Example:ServerActive=127.0.0.1:20051,zabbix.,[::1]:30051,::1,[12fc::1]#Mandatory:no#Default:# ###Option:Hostname Unique,casesensitive Requiredforactivechecksandmustmatchhostnameasconfiguredontheserver. ValueisacquiredfromHostnameItemifundefined.##Mandatory:no#Default:##Hostname=Zabbixserver###Option: ItemusedforgeneratingHostnameifitisundefined.IgnoredifHostnameisdefined. DoesnotsupportUserParametersoraliases.##Mandatory:no#Default:####Option: Optionalparameterthatdefineshost Hostmetadataisusedathostauto-registration Anagentwillissueanerrorandnotstartifthevalueisoverlimitof255characters. Ifnotdefined,valuewillbeacquiredfromHostMetadataItem.##Mandatory:#Range:0-255characters#Default:####Option: Optionalparameterthatdefinesanitemusedforgettinghostmetadata. Hostmetadataisusedathostauto-registrationprocess. Duringanauto-registrationrequestanagentwilllogawarningmessage thevaluereturnedbyspecifieditemisoverlimitof255 ThisoptionisonlyusedwhenHostMetadataisnotdefined.#Mandatory:no#Default:####Option: Howoftenlistofactivechecksisrefreshed,inseconds.#Mandatory:no#Range:60-#####Option:#DonotkeepdatalongerthanNsecondsinbuffer.#Mandatory:no#Range:1-3600#Default:####Option: umnumberofvaluesinamemorybuffer.Theagentwill allcollecteddatatoZabbixServerorifthebufferisfull.#Mandatory:no#Range:2-#####Option: umnumberofnewlinestheagentwillsendpersecondtoZabbixServer orprocessing'log'and'logrt'activechecks. Theprovidedvaluewillbeoverriddenbytheparameter'maxlines', providedin'log'or'logrt'itemkeys.##Mandatory:no#Range:1-1000#Default:#############ADVANCEDPARAMETERS###Option: Setsanaliasforanitemkey.Itcanbeusedtosubstitutelongandcomplexitemkeywithasmallerandsimplerone. MultipleAliasparametersmaybepresent.MultipleparameterswiththesameAliaskeyarenotallowed. DifferentAliaskeysmayreferencethesameitemkey. Forexample,toretrievetheIDofuser'zabbix': Nowshorthandkeyzabbix.useridmaybeusedtoretrievedata. AliasescanbeusedinHostMetadataItembutnotinHostnameItemparameters.#Mandatory:no#Range:####Option: SpendnomorethanTimeoutsecondsonprocessing#Mandatory:no#Range:1-30#Default:####Option: Allowtheagenttorunas'root'.Ifdisabledandtheagentisstartedby'root',the willtrytoswitchtotheuserspecifiedbytheUserconfigurationoptioninstead. Hasnoeffectifstartedunderaregularuser. 0-donot 1-allow#Mandatory:no#Default:####Option:#Dropprivilegestoaspecific,existinguseronthesystem.#Onlyhaseffectifrunas'root'andAllowRootisdisabled.#Mandatory:no#Default:####Option: Youmayincludeindividualfilesorallfilesinadirectoryintheconfiguration InstallingZabbixwillcreateincludedirectoryin/usr/local/etc,unlessmodifiedduringthecompiletime.##Mandatory:no#Default:##Include=/usr/local/etc/zabbix_agentd.conf.d/ #######USER-DEFINEDMONITOREDPARAMETERS##########Option: Allowallcharacterstobepassedinargumentstouser-definedparameters. Thefollowingcharactersarenotallowed: \'"`*?[]{}~$!&;()<>|# Additionally,newlinecharactersarenotallowed. 0-donotallow 1-allow#Mandatory:no#Range:0-1####Option: User-definedparametertomonitor.Therecanbeseveraluser-definedparameters. Format:UserParameter=<key>,<scommand> See'zabbix_agentd'directoryforexamples.#Mandatory:no#Default:#######LOADABLEMODULES###Option:#Fullpathtolocationofagentmodules.#Defaultdependsoncompilationoptions.#Mandatory:#####Option: Moduletoloadatagentstartup.Modulesareusedtoextendfunctionalityofthe Format: ThemodulesmustbelocatedindirectoryspecifiedbyLoadModulePath. ItisallowedtoincludemultipleLoadModuleparameters.##Mandatory:no#Default:########TLS-RELATEDPARAMETERS###Option: Howtheagentshouldconnecttoserveror .Usedforactivechecks. Onlyonevaluecanbespecified: unencrypted-connectwithout -connectusingTLSandapre-shared -connectusingTLSanda#Mandatory:yes,ifTLSorPSKparametersaredefined(evenfor'unencrypted'#####Option: ingconnectionsto Multiplevaluescanbespecified,separatedby unencrypted-acceptconnectionswithout
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 機(jī)關(guān)技術(shù)崗位管理制度匯編(3篇)
- 細(xì)胞呼吸的原理與應(yīng)用課件2025-2026學(xué)年高一上學(xué)期生物人教版必修1
- 2026廣東廣州市天河區(qū)華南師范大學(xué)招聘教輔人員2人備考考試試題及答案解析
- 2026年寶雞青銅器博物院寒假志愿者招募備考考試試題及答案解析
- 2026上半年云南事業(yè)單位聯(lián)考省民族宗教事務(wù)委員會委屬事業(yè)單位公開招聘人員備考考試試題及答案解析
- 2026青海海東市第二人民醫(yī)院校園引才招聘10人筆試備考題庫及答案解析
- 2026天津市河?xùn)|區(qū)教育系統(tǒng)招聘事業(yè)單位160人備考考試試題及答案解析
- 2026上海交通大學(xué)醫(yī)學(xué)院尚思神經(jīng)與視覺研究院招聘教學(xué)科研人員6人考試參考試題及答案解析
- 第四單元8夜色
- 2026浙江杭州蕭山區(qū)公安分局招聘警務(wù)輔助人員100人筆試備考試題及答案解析
- 高思導(dǎo)引3-6年級分類題目-數(shù)字謎02-三下02-簡單乘除法豎式
- 情侶自愿轉(zhuǎn)賬贈與協(xié)議書范本
- 2024-2030年中國異辛烷行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略分析報告
- 力士樂液壓培訓(xùn)教材
- JJG 692-2010無創(chuàng)自動測量血壓計
- 人教版四年級數(shù)學(xué)下冊第四單元大單元教學(xué)任務(wù)單
- 甘肅省安全員A證考試題庫及答案
- 旋挖鉆孔灌注樁施工記錄表(新)
- 第25課《活板》同步練習(xí)(含答案)
- 北京市XXXX年度“小學(xué)數(shù)學(xué)測試方案”培訓(xùn)課件
- 浙江省高級法院公布十大民間借貸典型案例
評論
0/150
提交評論