반응형

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 ConfigurationWeb. 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 ConfigurationHost 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 MonitoringWeb. 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/>

반응형

+ Recent posts