Telegraf: How to increase allowed message size?

I’m currently using Telegraf v1.23.4. I’m configuring the gNMI plugin to connect to an optical device. The connection is successfully made and I’m subscribing to the /slots path. It seems like the size of the data being received is beyond what is allowed. I’m seeing the below error message:

2023-01-04T20:16:43Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8166999 vs. 4194304)
2023-01-04T20:17:29Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8167006 vs. 4194304)
2023-01-04T20:18:13Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8166989 vs. 4194304)
2023-01-04T20:18:58Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (8167002 vs. 4194304)

Also, tried connecting to the /slots[name=1] path to pull data from slot 1. This reduced the message size but it was still greater than allowed.

2023-01-04T20:28:22Z E! [inputs.gnmi] Error in plugin: aborted gNMI subscription: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4338740 vs. 4194304)

Is there a way to increase the allowed size of the message?

Thank you.

It does not look like we expose an option for this in the gnmi input plugin. If you file a feature request it is something we could look to add. It would be similar to the max_msg_size option in the cisco_telemetry_mdt plugin.

To submit a feature request do I just create New Issue from the Telegraf github page?

yes please! Here is a direct link:

Thanks, Issue 12463 submitted.

1 Like