Basic questions and problems with creating a metricset

Hi all :slight_smile:

I ran into some very basic problems that I have difficulty solving.
I am trying to make a new metricset under the system module. I have downloaded the repo, ran make create-metricset. I got the new metricset visible in the module/system/{metricset} directory, and all looks fine.
According to the documentation, these steps create a "ready-to-go" framework for my metricset.
The new metricset is not present in the system.yml file, which I edit and add the "mymetricset" metricset to the config file.

  • module: system
    period: 10s
    metricsets:
    • mymetricset
    • cpu
    • load
    • memory
    • network
    • process
    • process_summary

Now after running "make update" the system.yml gets restored to default and whatever I change in the system.yml file (either adding my metricset, or removing other default ones). No error etc spits on the screen. I then run "make collect; make" and test the module with -e -d "*" and I see that my changes are not applied.

Can you help? I assume I am doing something wrong or missing some step, but looking at the documentation I can't see what I missed :frowning:

Peter

Hi Peter,

I just tried to create a new metricset named mymetricset under the system module by following the instructions in https://www.elastic.co/guide/en/beats/devguide/current/creating-metricsets.html. I was able to successfully create it without any issues.

One note: the metricsets listed in the modules.d/system.yml file are the ones that are enabled by default (except the ones that are commented out, of course). When you run make update, this file will be reset to it's default state. This default state is determined by the module/system/_meta/config.yml file. If you want your metricset to remain in the modules.d/system.yml file even after running make update, you'll need to add it to the module/system/_meta/config.yml file (and also the module/system/_meta/config.reference.yml file for completeness).

Hope that helps,

Shaunak

1 Like

" his default state is determined by the module/system/_meta/config.yml file"
That I hope does the trick! I don't know why, I have not found this anywhere and in the documentation it just says to modify the standard yml and run the makes :slight_smile:

Thanks a lot!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.