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 void run() { | |
| MetricsData curData = collectMetricsData(); | |
| if(isConsoleReporterOn) { | |
| consoleReporter.report(curData.getData()); | |
| } | |
| if(isCSVReporterOn) { | |
| csvReporter.report(curData.getData(), elapsedTime); | |
| } |
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(); |
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
| /** | |
| * Assume that there is a core service running at http://core-service-node1.com:8080 | |
| * Then metrics data will be available at http://core-service-node1.com:8081?metrics | |
| * ServerDataCollector can pull metrics data at a regular interval, and monitor real-time. | |
| * it can also save the monitored values */ | |
| public class PoundieService { | |
| public static void main(String[] args) throws URISyntaxException, InterruptedException { | |
NewerOlder