Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCollectorUDPWriter doesn't separate records with '\n' #597

Open
cole-christensen opened this issue Aug 10, 2017 · 0 comments · May be fixed by #707
Open

TCollectorUDPWriter doesn't separate records with '\n' #597

cole-christensen opened this issue Aug 10, 2017 · 0 comments · May be fixed by #707
Labels

Comments

@cole-christensen
Copy link

(data over the wire intercepted with netcat -ul 8953)
Expected

Memory.HeapMemoryUsage 1502401004 134217728 type=init
Memory.HeapMemoryUsage 1502401004 129761280 type=committed
Memory.HeapMemoryUsage 1502401004 129761280 type=max
Memory.HeapMemoryUsage 1502401004 21319040 type=used
Memory.NonHeapMemoryUsage 1502401004 2555904 type=init
Memory.NonHeapMemoryUsage 1502401004 21626880 type=committed
Memory.NonHeapMemoryUsage 1502401004 -1 type=max
Memory.NonHeapMemoryUsage 1502401004 20457864 type=used

Received

Memory.HeapMemoryUsage 1502401004 134217728 type=initMemory.HeapMemoryUsage 1502401004 129761280 type=committedMemory.HeapMemoryUsage 1502401004 129761280 type=maxMemory.HeapMemoryUsage 1502401004 21319040 type=usedMemory.NonHeapMemoryUsage 1502401004 2555904 type=initMemory.NonHeapMemoryUsage 1502401004 21626880 type=committedMemory.NonHeapMemoryUsage 1502401004 -1 type=maxMemory.NonHeapMemoryUsage 1502401004 20457864 type=used

tcollector udp_bridge.py expects metrics submitted over udp to be separated by newlines, instead they are concatenated together.

**Config file**

{
  "servers": [{
    "port": 2183,
    "host": "localhost",
    "alias": "${source_alias}",
    "queries": [{
      "outputWriters": [{
        "@class": "com.googlecode.jmxtrans.model.output.TCollectorUDPWriter",
        "host": "127.0.0.1",
        "port": 8953
      },{
        "@class" : "com.googlecode.jmxtrans.model.output.StdOutWriter"
      }],
      "obj": "java.lang:type=Memory",
      "resultAlias": "Memory",
      "attr": [
        "HeapMemoryUsage",
        "NonHeapMemoryUsage"
      ]
    }
    ],
    "numQueryThreads": 2
  }]
}
@gehel gehel added the bug label Aug 11, 2017
kevinconaway pushed a commit to kevinconaway/jmxtrans that referenced this issue Oct 3, 2018
kevinconaway pushed a commit to kevinconaway/jmxtrans that referenced this issue Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants