diff --git a/src/pxl_scripts/px/agent_status_diagnostics/agent_status.pxl b/src/pxl_scripts/px/agent_status_diagnostics/agent_status.pxl new file mode 100644 index 00000000000..aac14c7b199 --- /dev/null +++ b/src/pxl_scripts/px/agent_status_diagnostics/agent_status.pxl @@ -0,0 +1,28 @@ +# Copyright 2018- The Pixie Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +import px + +# Exclude kelvins since they don't run BPF programs nor +# do they have the host linux headers accessible +df = px.GetAgentStatus(False) +df = df.agg( + installed=('kernel_headers_installed', px.sum), + count=('kernel_headers_installed', px.count), +) +df.headers_installed_percent = df.installed / df.count +df = df.drop(['installed', 'count']) +px.display(df) diff --git a/src/pxl_scripts/px/agent_status_diagnostics/manifest.yaml b/src/pxl_scripts/px/agent_status_diagnostics/manifest.yaml new file mode 100644 index 00000000000..20807aecfa8 --- /dev/null +++ b/src/pxl_scripts/px/agent_status_diagnostics/manifest.yaml @@ -0,0 +1,4 @@ +--- +short: Agent status diagnostics +long: > + This script performs diagnostics on the agents' (PEMs/Collectors) status