@Override
	public void pollCycle() {
		List<Metric> allMetrics = new ArrayList<Metric>();
		try {
			String command = "";

			if (config.hasPath("user")) {
				command += "ssh -t " + config.getString("user") + "@" + config.getString("host");
			}
			
			if (config.hasPath("port")) {
				command += " -p " + config.getString("port");
			}

			command += " varnishstat -1 -x";

			if (config.hasPath("instance")) {
				command += " -n " + config.getString("instance");
			}

			Process p = Runtime.getRuntime().exec(command);

			BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
			StringBuilder builder = new StringBuilder();
			String aux = "";

			while ((aux = in.readLine()) != null) {
				builder.append(aux);
			}

			DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
			DocumentBuilder db = dbf.newDocumentBuilder();
			Document dom = db.parse(new InputSource(new ByteArrayInputStream(builder.toString().replace("\t", "").getBytes("utf-8"))));

			NodeList nlist = dom.getElementsByTagName("stat");

			for (int i = 0; i < nlist.getLength(); i++) {
				allMetrics.add(getMetric((Element) nlist.item(i)));
			}

			p.waitFor();

		} catch (Exception e) {
			LOGGER.error(e);
		} finally {
			LOGGER.debug("pushing " + allMetrics.size() + " metrics...");
			for (Metric m : allMetrics) {
				LOGGER.debug(m.name + "[" + m.valueType + "] --> " + m.value);
				reportMetric(m.name, m.valueType, m.value);
			}
			LOGGER.debug("done!");
		}
	}