Created
August 13, 2013 20:48
-
-
Save TurtleShip/6225535 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main() { | |
String whovilleStagingMetrics = "http://whoville-001.sjc1.yammer.com:8081/metrics"; | |
ServerDataCollector whoville_collector = new ServerDataCollector(whovilleStagingMetrics); | |
whoville_collector.setRateInSec(1L); | |
String graphite_host = "10.180.1.232"; | |
int graphite_port = 2003; | |
String rootPrefix = "monitor-staging"; | |
String metricsPrefix = "whoville-001"; | |
whoville_collector.turnGraphiteReporterOn(graphite_host, graphite_port, rootPrefix, metricsPrefix); | |
whoville_collector.report(); | |
try { | |
Thread.sleep(5000); | |
} catch(Exception e) { | |
System.out.println("sleep 0 failed"); | |
} | |
whoville_collector.pause(); | |
try { | |
Thread.sleep(5000); | |
} catch(Exception e) { | |
System.out.println("sleep 1 failed"); | |
} | |
whoville_collector.restart(); | |
try { | |
Thread.sleep(5000); | |
} catch(Exception e) { | |
System.out.println("sleep 2 failed"); | |
} | |
whoville_collector.stop(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment