peaksnail/pinpoint-node-agent

how to collect stats on tcp

Opened this issue · 3 comments

I have done the setup as mentioned and done required changes, and started the nodejs app.

I can see that pinpoint has loaded successfully, and I can even see this app in the pinpoint web.
But not able to see any stats on the web.

I am seeing these logs and I can see that they are sending on UDP, but our current setup of pinpoint, wont accept UDP connections, we have setup it up to use only TCP.

Can you please let us know how can we change the config so that nodejs sends stats only on TCP.

[2019-10-16 10:02:10.004] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/metric/agent_stat_monitor] send agent stat:{"agentId":"node-app-id","startTimestamp":1571219441402,"timestamp":1571220130004,"collectInterval":1000,"gc":{"type":0,"jvmMemoryHeapUsed":314277888,"jvmMemoryHeapMax":8623489024,"jvmMemoryNonHeapUsed":-1,"jvmMemoryNonHeapMax":-1,"jvmGcOldCount":-1,"jvmGcOldTime":-1,"jvmGcDetailed":null},"cpuLoad":{"jvmCpuLoad":0.002,"systemCpuLoad":0.0201804535491045},"transaction":null,"activeTrace":null,"metadata":null} [2019-10-16 10:02:10.004] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/metric/agent_stat_monitor] send agent stat:{"agentId":"node-app-id","startTimestamp":1571219441402,"timestamp":1571220130004,"collectInterval":1000,"gc":{"type":0,"jvmMemoryHeapUsed":314277888,"jvmMemoryHeapMax":8623489024,"jvmMemoryNonHeapUsed":-1,"jvmMemoryNonHeapMax":-1,"jvmGcOldCount":-1,"jvmGcOldTime":-1,"jvmGcDetailed":null},"cpuLoad":{"jvmCpuLoad":0.002,"systemCpuLoad":0.0201804535491045},"transaction":null,"activeTrace":null,"metadata":null} [2019-10-16 10:02:10.032] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.032] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.043] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.043] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.071] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.071] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.077] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:10.077] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] UDP message sent to qa4-ops-pinpoint-collector.com:9995, size is: 79 [2019-10-16 10:02:21.648] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] start pinpoint node agent [2019-10-16 10:02:21.648] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] start pinpoint node agent [2019-10-16 10:02:21.650] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] init tcp client [2019-10-16 10:02:21.651] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/tcp_client] use tcp server 127.0.0.1:9994 [2019-10-16 10:02:21.652] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] init udp client in local process [2019-10-16 10:02:21.652] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] use udp server 127.0.0.1:9996 [2019-10-16 10:02:21.653] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/socket/udp_client] use udp server 127.0.0.1:9995 [2019-10-16 10:02:21.653] [INFO] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] sending agent info to collector [2019-10-16 10:02:21.654] [DEBUG] [node-app-name] [node_modules/pinpoint-node-agent/agent/commons/agent] agent info: {"hostname":"xx.xx.xx.xx","ip":"XX.XX.XX.XX","ports":"1","agentId":"node-app-id","applicationName":"node-app-name","serviceType":1000,"pid":23263,"agentVersion":"1","vmVersion":"1","startTimestamp":1571220141648,"endTimestamp":null,"endStatus":null,"serverMetaData":null,"jvmInfo":null,"applicationServiceType":1000}

the node agent is based on pinpoint version 1.6.0, and the collector can't receive span data using tcp

HI @peaksnail

Is there any possibility that can we make changes to the code so that we can send the stats on tcp.
If yes, can you please guide me through it.

Thanks

hi
you should know the stat data structure on tcp to the collector and then rewrite the sending logic with tcp