Renaming fields name

I have to rename the field name being received from telegraf. I do understand we have processor plugin which rename.replace which can do it. But I am stuck where 2 different fields have same name for 2 different metric name.
For e.g.
{“fields”:{“total”:1000},“name”:“mem”,“tags”:{“host”:“abc”},“timestamp”:1531232}
{“fields”:{“total”:1000},“name”:“disk”,“tags”:{“host”:“abc”},“timestamp”:1531232}

Now I want rename, field total as phymem in mem measaurement while field total as phydisk in disk measurement.
How do we achieve this?

Setup two processors, and use namepass to control which measurements pass through them. It should look something like:

[[processors.rename]]
  namepass = ["disk"]
  [[processors.rename.replace]]
    field = "total"
    dest = "phydisk"

[[processors.rename]]
  namepass = ["mem"]
  [[processors.rename.replace]]
    field = "total"
    dest = "phymem"

Thanks for the quick help. It helped a lot.