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/>
'오픈소스 활용하기' 카테고리의 다른 글
Zabbix 한글깨짐 관련 (0) | 2023.11.09 |
---|---|
Zabbix 3.4에서 WindowsOS의 자동 시작 트리거를 일부 서비스 만 제외하는 방법 (0) | 2023.11.09 |
Zabbix Server is not running (0) | 2023.11.09 |
AB(Apache HTTP server benchmarking tool)를 활용해 벤치마킹 테스트 해보기 (0) | 2023.11.08 |
Jmeter를 사용한 Stress Test (웹서버 부하(스트레스) 테스트) (1) | 2023.11.08 |