You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement surfacer extension interface
At the moment it is possible to extend surfacers via user defined surfacer type. But unfortunately this way is not flexible enough when it is required to pass additional configuration to the surfacer. It would be good to implement surfacer extension similar to probes.
We didn't feel the need for surfacer extensions because extensions are truly useful when you want to have multiple types of them in a single process. For example, if you define a redis probe extension, you may run multiple redis probes with slightly different parameters within the same process.
On the other hand, if you implement a new surfacer type, you can take its configuration at the binary level. For example, if you're adding let's say a Dynatrace surfacer, you can take Dynatrace config at the binary level .. either through environment variables or flags. Extension will be useful if you want to define multiple Dynatrace surfacers, each with slightly different config.
Does it make sense? If you can explain your use case a bit more we can prioritize it better.
I do not think that we need multiple types of same surfacer in one processes, I've missed this is a difference also.
We are trying to use cloudprober as a monitoring for OpenStack (this is opensource cloud technology). The user workloads there running in fully is isolated private networks, under the hood (depend on the networking driver) the network is an abstraction represents as linux network namespace. So we starting a cloudprober instance for each OpenStack network (linux network namespace). Later we aggregate metrics from all cloudprober instances. Custom surfacer stores metrics in a files in json/yaml format. So we can easely read all files and make combined output.
We already pass configuration externally to the surfacer this works for sure, but I was thinking that idea of implementing an ability to extend surfacer configuration with protobuf extension makes sense.
Being able to configure the surfacers via the same prototext interface as the probes and targets would be useful. We can configure them via the binary config with flags/env variables, but it starts making it harder to reuse things like the Helm charts because of plumbing through extra args.
The prototext interface is quite nice to get the validation that comes with the rest of the config too.
Activity
manugarg commentedon Jan 7, 2024
Hello @jumpojoy,
We didn't feel the need for surfacer extensions because extensions are truly useful when you want to have multiple types of them in a single process. For example, if you define a redis probe extension, you may run multiple redis probes with slightly different parameters within the same process.
On the other hand, if you implement a new surfacer type, you can take its configuration at the binary level. For example, if you're adding let's say a Dynatrace surfacer, you can take Dynatrace config at the binary level .. either through environment variables or flags. Extension will be useful if you want to define multiple Dynatrace surfacers, each with slightly different config.
Does it make sense? If you can explain your use case a bit more we can prioritize it better.
Thanks,
Manu
jumpojoy commentedon Jan 15, 2024
Hello @manugarg !
Thanks for quick reply.
I do not think that we need multiple types of same surfacer in one processes, I've missed this is a difference also.
We are trying to use cloudprober as a monitoring for OpenStack (this is opensource cloud technology). The user workloads there running in fully is isolated private networks, under the hood (depend on the networking driver) the network is an abstraction represents as linux network namespace. So we starting a cloudprober instance for each OpenStack network (linux network namespace). Later we aggregate metrics from all cloudprober instances. Custom surfacer stores metrics in a files in json/yaml format. So we can easely read all files and make combined output.
We already pass configuration externally to the surfacer this works for sure, but I was thinking that idea of implementing an ability to extend surfacer configuration with protobuf extension makes sense.
Thanks,
Vasyl
Garbett1 commentedon Aug 12, 2025
Being able to configure the surfacers via the same prototext interface as the probes and targets would be useful. We can configure them via the binary config with flags/env variables, but it starts making it harder to reuse things like the Helm charts because of plumbing through extra args.
The prototext interface is quite nice to get the validation that comes with the rest of the config too.
manugarg commentedon Aug 12, 2025
Okay, I guess it does make sense. I'll look into this.
jumpojoy commentedon Aug 12, 2025
I ended up with custom surfacer https://github.com/jumpojoy/osprober/tree/master/surfacers/formated_file like this, maybe it will help.
manugarg commentedon Aug 12, 2025
Here is the PR implementing it:
#1126
This is the new interface: