# Metricbeat vs elastic agent

**URL:** <https://discuss.elastic.co/t/metricbeat-vs-elastic-agent/376663>\
**Category:** Elastic Agent\
**Created:** [April 2, 2025, 6:06am UTC](https://discuss.elastic.co/t/metricbeat-vs-elastic-agent/376663 "2025-04-02T06:06:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dth\_Revan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dth_revan/32/147877_2.png) [@Dth\_Revan](https://discuss.elastic.co/u/Dth_Revan)\
**Post date:** [April 2, 2025, 6:06am UTC](https://discuss.elastic.co/t/metricbeat-vs-elastic-agent/376663/1 "2025-04-02T06:06:33Z")

</div>

Hello, everyone!  
Not so long ago i decided to try elastic agent+system integration instead of metricbeat with system module (which i have used for a very long time). the problem i faced is i can't make SOME graphs in grafana using new sourse (elastic agent). the only difference i noticed is that metricbeat creates index with "system.network.in.bytes" field as "Number" type, which can be succesfully used with grafana "script" option on a query tab. and elastic agent creates the same field "system.network.in.bytes" as "Counter metric" type  
so...when i try to make a graph to count network megabits/second, the only way i know is to make it in two steps: count average, count derivative after that

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/1/41d7b37fd55e77953ef0355c38db19f60dae5de0.png)  
then i make some math on those numbers to transform bytes into megabits  
i use this formula in "script" tab within a query:  
(\_value \* 8 )/ ($\_\_interval\_ms / 1000) and it works with metricbeat source  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f057a5bfae9fedbdaebae1588ed37785a57b223c.png)

but when i add this formula to a new source, it immediately breaks a query  
the only assumption i have is this difference in fields types

can you please answer at least one of my questions:

1. is there a way to make this math on current fields (elastic agent+system integration source)
2. is there an another way to count megabits/second on graph instead of my math? keep in mind that i use the same principles to count many metrics, so your suggetion have to work universally, not exactly here, with system.network integration
3. can i make needed math previously, on elastic index level? to have pre-prepared variable that i can use in grafana directly, not using any math on it's level
4. can i make some changes (and which) to transform fields types in elastic agent source to make them the same as in metricbeat source? and will these manipulations be a correct way to use indices?

---

<div class="post-metadata">

**Author:** ![Dth\_Revan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dth_revan/32/147877_2.png) [@Dth\_Revan](https://discuss.elastic.co/u/Dth_Revan)\
**Post date:** [May 22, 2025, 12:37pm UTC](https://discuss.elastic.co/t/metricbeat-vs-elastic-agent/376663/2 "2025-05-22T12:37:45Z")

</div>

Please UP!

---

<div class="post-metadata">

**Author:** ![Dth\_Revan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dth_revan/32/147877_2.png) [@Dth\_Revan](https://discuss.elastic.co/u/Dth_Revan)\
**Post date:** [October 2, 2025, 7:56am UTC](https://discuss.elastic.co/t/metricbeat-vs-elastic-agent/376663/3 "2025-10-02T07:56:26Z")

</div>

Not much time ago i found an answer, how to make it possible, and i hope it would be usefull for all, who came to this page. so we should do next several things:

1. get rid of any text in Script fields

2. in Derivative metric section we should set units to make grafana do all things for us

3. chose right units

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/b/ebc8c87987f4cbbcddd72208edb49ae54f048886.png)
