public void run() {
		String host = uri.getHost() == null ? "localhost" : uri.getHost();
		int port = uri.getPort();

		ClientBootstrap bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory(
				Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));

		// Set up the pipeline factory.
		bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
			public ChannelPipeline getPipeline() throws Exception {
				ChannelPipeline pipeline = Channels.pipeline();
				pipeline.addLast("codec", new HttpClientCodec());

				pipeline.addLast("handler", new HttpClientHandler());
				return pipeline;
			}
		});

		// bootstrap.setOption("sendBufferSize", 1048576*10);
		bootstrap.setOption("tcpNoDelay", true);
		bootstrap.setOption("keepAlive", true);

		// Start the connection attempt.
		ChannelFuture future = bootstrap.connect(new InetSocketAddress(host, port));

		Channel channel = future.awaitUninterruptibly().getChannel();
		if (!future.isSuccess()) {
			future.getCause().printStackTrace();
			bootstrap.releaseExternalResources();
			return;
		}

		HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, uri.getRawPath());
		request.setHeader(HttpHeaders.Names.HOST, host);
		request.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE);
		request.setHeader(HttpHeaders.Names.CONTENT_TYPE, "application/x-www-form-urlencoded");

		

		MonitorService service = new MonitorService(sigar);
		Map<String, Object> map = service.statsMap();
		ObjectMapper mapper = new ObjectMapper();
		String message = null;
		try {
			message = mapper.writeValueAsString(map);
		} catch (JsonGenerationException e) {
			e.printStackTrace();
		} catch (JsonMappingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		String params = "message=" + message;

		ChannelBuffer cb = ChannelBuffers.copiedBuffer(params, CharsetUtil.UTF_8);

		request.setHeader(HttpHeaders.Names.CONTENT_LENGTH, cb.readableBytes());

		request.setContent(cb);

		// Send the HTTP request.
		channel.write(request);

		channel.getCloseFuture().awaitUninterruptibly();
		bootstrap.releaseExternalResources();

	}