congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RedisMonitor
Code IndexAdd Tabnine to your IDE (free)

How to use
RedisMonitor
in
scouter.agent.counter.task

Best Java code snippets using scouter.agent.counter.task.RedisMonitor (Showing top 1 results out of 315)

origin: scouter-project/scouter

public void process(CounterBasket pw) throws IOException {
  Configure conf = Configure.getInstance();
  boolean redisEnabled = conf.getBoolean("redis_enabled", false);
  if (redisEnabled) {
    String serverIp = conf.getValue("redis_server_ip", "127.0.0.1");
    int serverPort = conf.getInt("redis_server_port", 6379);
    String perfInfo = getRedisPerfInfo(serverIp, serverPort);
    String[] lines = perfInfo.split("\n");
    PerfCounterPack p = pw.getPack(conf.getObjName(), TimeTypeEnum.REALTIME);
    for (String line : lines) {
      String key = line.substring(0, line.indexOf(':'));
      String value = line.substring(line.indexOf(':') + 1);
      if (floatSet.contains(key)) {
        p.put(key, new FloatValue(Float.valueOf(value.trim())));
      }
      if (decimalSet.contains(key)) {
        p.put(key, new DecimalValue(Long.valueOf(value.trim())));
      }
    }
  }
}
scouter.agent.counter.taskRedisMonitor

Javadoc

This prototype was contributed by jeonwoosung@gmail.com Deprecated - This feature is going to move https://github.com/scouter-project/scouter-redis-agent

Most used methods

  • getRedisPerfInfo

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now