-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include volume type in volume metricset data from Kubernetes module #39524
Comments
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
Hello @eedugon , I started having a look at this. For my testing I have something as simple as: Redis manifest with a volume with type `EmptyDir`apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis
volumeMounts:
- name: redis-storage
mountPath: /data/redis
volumes:
- name: redis-storage
emptyDir: {} Once installed I exec into elastic-agent pod and retrieve the kubelet /stats/summry info: How to retrieve kubelet infoTOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
curl https://kind-control-plane:10250/stats/summary --header "Authorization: Bearer $TOKEN" --insecure See below the volume section. I can not see any volume type information relative to our case here. "volume": [
{
"time": "2024-06-26T10:03:31Z",
"availableBytes": 16463179776,
"capacityBytes": 109647159296,
"usedBytes": 1130033152,
"inodesFree": 6016189,
"inodes": 6815744,
"inodesUsed": 33204,
"name": "redis-storage"
},
{
"time": "2024-06-26T10:03:31Z",
"availableBytes": 11221483520,
"capacityBytes": 11221495808,
"usedBytes": 12288,
"inodesFree": 1369802,
"inodes": 1369811,
"inodesUsed": 9,
"name": "kube-api-access-6h6pj"
}
], For clarity, I also include the full output of /stats/summary endpoint in file Also the only metadata we add in the metricset relates to the pod.name.
Can you please verify your comment, maybe I am missing something here? Same is related with #39525 |
@gizas , I'm sorry if my sentence about this being I don't think you are missing anything. The thing is that I didn't really know from where exactly the beat is taking the information about volumes, and I was only considering how a It's true that this Sorry for the noise here! The reasoning behind wishing this type of data (type of volume and mount_point) to be available is that the volume stats are providing a massive amount of documents and in a lot of use cases the majority of them are useless in terms of stats. For example an Elasticsearch pod owned by ECK has a lot of configmaps and secrets mounted and each of them is reported as a separate volume, which stats are kind of irrelevant. I still think this would be very useful, but might be difficult to accomplish. From a
But it's true that the stats API you provided would only show some stats about the |
Describe the enhancement:
Currently our Metricbeat Kubernetes volume is not collecting volume types in the
volume
metricset.Kubernetes volumes can be of many different types, and many of them might be unwanted by the users in certain visualizations or even during data collection. Examples of volume types are:
Secret
,ConfigMap
,HostPath
,EmptyDir
,PersistentVolumeClaim
.It would be very useful to include the volume type into the field
kubernetes.volume.type
, which is currently not offered.In case of supporting this, ideally we should also offer in the metricset the capacity of filtering out incoming data, in the same way as we do in the
system-->filesystem
metricset withfilesystem.ignore_types
. We could offer this with something likevolume.ignore_types
.I also believe implementing this should be easy as the--> Update: the previous is incorrect. A volume doesn't have an explicittype
is part of the volume metadata.type
setting, it just has different settings depending on its type.The same should be applied to Elastic Agent Kubernetes integration.
Describe a specific use case for the enhancement or feature:
Kubernetes monitoring and wanting to optimize data collection.
The text was updated successfully, but these errors were encountered: