Hi all,

I am currently using the Storm UI metrics REST API to retrieve metrics from 
Storm, but it seems like the CPU and Memory metrics are always 0:

bash$ curl -X GET http://localhost:9080/api/v1/supervisor/summary | jq
{
  "supervisors": [
    {
      "totalMem": 3072,
      "slotsFree": 3,
      "host": "mx12405vm",
      "id": "6cb0b55a-ec38-47dd-afef-939ca64d8228",
      "uptime": "2h 4m 29s",
      "availMem": 3072,
      "totalCpu": 400,
      "usedCpu": 0,
      "logLink": "http://mx12405vm:8000/daemonlog?file=supervisor.log";,
      "usedMem": 0,
      "availCpu": 400,
      "slotsUsed": 1,
      "version": "1.2.1",
      "slotsTotal": 4,
      "uptimeSeconds": 7469
    }
  ],
  "schedulerDisplayResource": true,
  "logviewerPort": 8000
}


I am using a test topology (attached code) that artificially consumes cpu with 
a never-ending for loop:

public class DummyBolt extends BaseBasicBolt {
    public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) 
{
        System.out.println("Bolt is receiving id="+tuple.toString());
        for(;;){}
    }

    public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {

    }
}

Is there any setting that needs to be activated in order to publish these 
metrics ?
I tried switching schedulerDisplayResource to true but it did not change 
anything...

Thanks,
Thomas


******************************* This e-mail contains information for the 
intended recipient only. It may contain proprietary material or confidential 
information. If you are not the intended recipient you are not authorized to 
distribute, copy or use this e-mail or any attachment to it. Murex cannot 
guarantee that it is virus free and accepts no responsibility for any loss or 
damage arising from its use. If you have received this e-mail in error please 
notify immediately the sender and delete the original email received, any 
attachments and all copies from your system.

Attachment: DummyBolt.java
Description: DummyBolt.java

Attachment: DummySpout.java
Description: DummySpout.java

Attachment: DummyTopology.java
Description: DummyTopology.java

Reply via email to