---
title: "Discussion on \"How to calculate bandwidth use with SNMP and Logstash\" | Hashnode"
description: "Discussion on \"How to calculate bandwidth use with SNMP and Logstash\". This article was inspired from Cisco Blog\nHow we calculate the bandwidth use depends on how data is presented for what we want to measure. Interface use is the primary measure used for network use. Use this formulas, based on whether the connection y..."
url: "https://hashnode.com/posts/how-to-calculate-bandwidth-use-with-snmp-and-logstash/5fe21d87c65ad56bef3a2f71"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to calculate bandwidth use with SNMP and Logstash](https://synapticiel.hashnode.dev/how-to-calculate-bandwidth-use-with-snmp-and-logstash?utm_source=hashnode&utm_medium=feed)

This article was inspired from Cisco Blog How we calculate the bandwidth use depends on how data is presented for what we want to measure. Interface use is the primary measure used for network use. Use this formulas, based on whether the connection y...

Dec 8, 2020 · 12 min read · synapticiel.hashnode.dev  
Read the article

-   [#logstash](https://hashnode.com/tag/logstash)
-   [#elasticsearch](https://hashnode.com/tag/elasticsearch)
-   [#kibana](https://hashnode.com/tag/kibana)
-   [#networkautomation](https://hashnode.com/tag/networkautomation)
-   [#network](https://hashnode.com/tag/network)

## Written by

[Yassine LASRI](https://hashnode.com/@ylasri)

@ylasri · Rabat, Morocco

  
[View profile](https://hashnode.com/@ylasri)

synaptique.com

Product Manager at Synapticiel, IT &amp; Telecoms Professional, Interested in ML, AI, IoT, BigData, Cyber Security, RA, FMS, Next Generation BSS/OSS, Mobile Money

## Responses 1

Markdown supported · ⌘↵ to post

[Nicolas Le Jeune](https://hashnode.com/@Joyrock)

[Dec 30, 2021](https://hashnode.com/posts/how-to-calculate-bandwidth-use-with-snmp-and-logstash/5fe21d87c65ad56bef3a2f71/comment/61ce35647cb96c3f9225ea34)

Thank you so much for your guidance on this topic, it serve exactly my need. I followed your example and created a new .conf pipeline in my logstash pipeline folder. But I can't figure out where I should store the query\_ifIndex\_template.json If I store it in the pipeline folder directly, it doesn't work and crash my logstash instance :

\[2021-12-30T22:25:23,339\]\[ERROR\]\[logstash.agent \] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=>"LogStash::ConfigurationError", :**message=>"Expected one of \[ \\t\\r\\n\], \\"#\\", \\"input\\", \\"filter\\", \\"output\\" at line 1, column 1 (byte 1)",** :backtrace=>\["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:187:in`initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:47:in`initialize'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline\_action/create.rb:52:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:383:in`block in converge\_state'"\]}

If I put the json somewhere else I have this error :

\[2021-12-30T22:37:10,481\]\[ERROR\]\[logstash.javapipeline \]\[main\] Pipeline error {:pipeline\_id=>"main", :exception=>#**<Errno::ENOENT: No such file or directory - query\_ifIndex\_template.json>**, :backtrace=>\["org/jruby/RubyIO.java:1237:in `sysopen'", "org/jruby/RubyFile.java:365:in`initialize'", "org/jruby/RubyIO.java:1156:in `open'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-filter-elasticsearch-3.11.0/lib/logstash/filters/elasticsearch.rb:103:in`register'", "org/logstash/config/ir/compiler/AbstractFilterDelegatorExt.java:75:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:232:in`block in register\_plugins'", "org/jruby/RubyArray.java:1821:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:231:in`register\_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:590:in `maybe_setup_out_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:244:in`start\_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java\_pipeline.rb:189:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:141:in`block in start'"\], "pipeline.sources"=>\["/usr/share/logstash/pipeline/logstash.conf", "/usr/share/logstash/pipeline/snmp.conf"\], :thread=>"#<Thread:0x6fe49869 run>"}

[Yassine LASRI](https://hashnode.com/@ylasri)

[Dec 31, 2021](https://hashnode.com/posts/how-to-calculate-bandwidth-use-with-snmp-and-logstash/5fe21d87c65ad56bef3a2f71/comment/61ce35647cb96c3f9225ea34#reply-61cea7317cb96c3f9225f0e4)

You can put the template in the same forlder as the pipeline or just specific the absolute path

But the initial error show that there is a syntaxe error in your pipeline. could you share it to check ?

[Nicolas Le Jeune](https://hashnode.com/@Joyrock) Email me on yassine.lasri@gmail.com for any assistance
