Back to index

munin  2.0.1
MultigraphMisc.java
Go to the documentation of this file.
00001 package org.munin.plugin.jmx;
00002 
00003 import java.util.LinkedHashMap;
00004 import java.util.Map;
00005 
00006 public class MultigraphMisc extends AbstractMultiGraphsProvider {
00007        private static final String PREFIX = "_misc";
00008 
00009        public MultigraphMisc(Config config) {
00010               super(config);
00011               // can't set the PREFIX itself, because we also need to use config
00012               // without that prefix for the legacy data storage graphs
00013               // setPrefix(getPrefix() + PREFIX);
00014        }
00015 
00016        @Override
00017        protected Map<String, AbstractGraphsProvider> getProviders() {
00018               Map<String, AbstractGraphsProvider> providers = new LinkedHashMap<String, AbstractGraphsProvider>();
00019               addWithAlias(providers, new Uptime(config), "_Uptime", PREFIX, PREFIX
00020                             + ".uptime");
00021               addWithAlias(providers, new ClassesLoaded(config), "_ClassesLoaded", PREFIX + ".classes_loaded");
00022               addWithAlias(providers, new ClassesUnloaded(config), "_ClassesUnloaded", PREFIX + ".classes_unloaded");
00023               addWithAlias(providers, new ClassesLoadedTotal(config), "_ClassesLoadedTotal", PREFIX + ".classes_loaded_total");
00024               addWithAlias(providers, new CompilationTimeTotal(config), "_CompilationTimeTotal", PREFIX + ".compilation_time_total");
00025               addWithAlias(providers, new ProcessorsAvailable(config), "_ProcessorsAvailable", PREFIX + ".processors_available");
00026               return providers;
00027        }
00028 
00029        public static void main(String[] args) {
00030               runGraph(args);
00031        }
00032 }