Zabbix – use web monitoring for FTP check
Posted: July 10, 2012 | Author: Chris | Filed under: Zabbix |2 Comments
Zabbix web scenarios use cURL to check your web pages and cURL can be used to connect/download/upload to a FTP server, so I thought I could combine the two and see what happens. Well, this check works a lot better than the original FTP check I had created so I’d say it’s a success. As a bonus, you get download throughput and response time metrics for your FTP session checks.
Create web scenario
Here’s how you can set up web monitoring for FTP. First, create your web scenario under Configuration, Web. Select a host to assign this web check to and then select Create Scenario.
I kept everything at the default settings and created a single step to download a file from the FTP server as a test that everything is working properly.
Application - web (or something similar)
Name - FTP check
Authentication - none (I pass username/password in URL)
Update interval - 60
Agent - Internet Explorer 6.0 ( default, haven't tried other agents)
Status - active
Variables - empty
Steps -
name - FTP check
URL - ftp://username:password@servername.domain.com
post - empty
timeout - 15
required - filename (this is the file you want to check for on the FTP server)
status codes - 226 (FTP server response codes)
Trigger Configuration
Once your scenario is in place you can create a trigger to fire when something isn’t right. Select Configuration, Host and select the host you created the web scenario under. Select Triggers and Create Trigger. Name your new trigger and choose the expression to trigger off of. I usually choose the ‘failed step of scenario…’ expression and set it to ‘last value NOT N’ with a value of zero. This way anything that isn’t a success will cause a trigger to fire.
name - FTP check
expression - {HOST_A:web.test.fail[FTP check].last(0)}#0
event generation - normal
severity - high
Once all of that is finished check your new monitor entry under Monitoring, Web. If you want to get a little more advanced with your FTP checks, you can add a trigger that fires when the response time is too long. Just a thought.
The web monitoring doesn’t have to be used only for monitoring actual web pages. cURL is very powerful and can allow for some great checks for your Zabbix environment. Learn more about cURL’s awesomeness here.
출처: <https://mypoorbraindump.wordpress.com/2012/07/10/zabbix-use-web-monitoring-for-ftp-check/>
'오픈소스 활용하기' 카테고리의 다른 글
안정적인 IT 지원의 시작과 끝' 무료 헬프데스크 티켓팅 툴 6가지 (0) | 2021.11.25 |
---|---|
쓸만한 오픈소스 모니터링 툴 7종 (0) | 2021.11.19 |
zabbix Server is not runing (0) | 2021.11.19 |
Ubuntu에서 timezone 변경 하기 (0) | 2021.11.19 |
Zabbix 시간 잘못 표시 되는 경우 처리 (0) | 2021.11.19 |