From c1040c550474c510b2839f57cb644fd0e45b1dcf Mon Sep 17 00:00:00 2001 From: root Date: Tue, 15 Dec 2020 10:03:13 +0000 Subject: [PATCH 1/3] k8s ms lib extended --- KUBERNETES/Generic/.meta_icmp_probes.xml | 39 +++++++++++++ KUBERNETES/Generic/.meta_logs.xml | 39 +++++++++++++ KUBERNETES/Generic/icmp_probes.xml | 63 +++++++++++++++++++++ KUBERNETES/Generic/logs.xml | 71 ++++++++++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100755 KUBERNETES/Generic/.meta_icmp_probes.xml create mode 100755 KUBERNETES/Generic/.meta_logs.xml create mode 100644 KUBERNETES/Generic/icmp_probes.xml create mode 100644 KUBERNETES/Generic/logs.xml diff --git a/KUBERNETES/Generic/.meta_icmp_probes.xml b/KUBERNETES/Generic/.meta_icmp_probes.xml new file mode 100755 index 00000000..f43c1cd4 --- /dev/null +++ b/KUBERNETES/Generic/.meta_icmp_probes.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1607418879079 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1607418879075 + + + MODEL + 20060101 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 20060101 + + + TYPE + FILE + + + COMMENT + + + diff --git a/KUBERNETES/Generic/.meta_logs.xml b/KUBERNETES/Generic/.meta_logs.xml new file mode 100755 index 00000000..17841c42 --- /dev/null +++ b/KUBERNETES/Generic/.meta_logs.xml @@ -0,0 +1,39 @@ + + + + + DATE_MODIFICATION + 1607672420644 + + + REPOSITORY + CommandDefinition + + + DATE_CREATION + 1607672420638 + + + MODEL + 20060101 + + + TAG + + + FILE_TYPE + text + + + MANUFACTURER + 20060101 + + + TYPE + FILE + + + COMMENT + + + diff --git a/KUBERNETES/Generic/icmp_probes.xml b/KUBERNETES/Generic/icmp_probes.xml new file mode 100644 index 00000000..1097f89f --- /dev/null +++ b/KUBERNETES/Generic/icmp_probes.xml @@ -0,0 +1,63 @@ + + + none + + object_id + + 0 + 0 + xml + + + false + false + false + 0 + + icmp probes + container|k8s|MEC + false + 0 + false + false + false + false + param._order + + + + + + + + + + + + + GET + +
+ @^\s \s*$@ + //root +
+ +
+ /api/v1/namespaces/network-metrics/pods +
+ + + + {literal}{{/literal}"apiVersion":"v1","kind":"Pod","metadata":{literal}{{/literal}"name":"{$params.pod_name}","namespace": "{$params.namespace}"{literal}}{/literal},"spec":{literal}{{/literal}"containers":[{literal}{{/literal}"name":"{$params.container_name}","image":"alpine","command":["/bin/sh", "-c", "ping {$params.remote_ip} -c {$params.pkt_count} -s {$params.pkt_size} -A -q"]{literal}}{/literal}],"restartPolicy":"Never"{literal}}{/literal} +{literal}}{/literal} + POST# + /api/v1/namespaces/{$params.namespace}/pods + + + {} + DELETE + /api/v1/namespaces/{$k8s_pods.$object_id.namespace}/pods/{$k8s_pods.$object_id.pod_name} + + + +
diff --git a/KUBERNETES/Generic/logs.xml b/KUBERNETES/Generic/logs.xml new file mode 100644 index 00000000..12490aac --- /dev/null +++ b/KUBERNETES/Generic/logs.xml @@ -0,0 +1,71 @@ + + + none + + object_id + + 0 + 0 + xml + + + false + false + false + 0 + + logs + container|k8s|MEC + false + 0 + false + false + false + false + param._order + + + + + + + + + + + + + + GET + +
+ @^\s \s*$@ + //root +
+ + + + @PING (?<object_id>([0-9]{1,3}\.){3}[0-9]{1,3})[^:]+:\s+(?<size>\d+)@ + //line_1 + + + + @(?<transmitted>\d+)[^\d]+(?<received>\d+)[^\d]+(?<loss>\d+)@ + //line_4 + + + + @(?<min>\d+\.\d+)\/(?<avg>\d+\.\d+)\/(?<max>\d+\.\d+)@ + //line_5 + + +
+ /api/v1/{$params.url} +
+ + + + + + +
From a3e1f9e4870e51a863997fe1ec8ac3baa82d65f5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 Jan 2021 17:24:16 +0000 Subject: [PATCH 2/3] Kubernetes web-UI tables refined --- KUBERNETES/Generic/.meta_Nodes.xml | 14 +++--- KUBERNETES/Generic/.meta_k8_pods_list.xml | 4 +- KUBERNETES/Generic/Nodes.xml | 52 ++++++++++++++++++++++- KUBERNETES/Generic/k8_pods_list.xml | 30 ++++++------- 4 files changed, 73 insertions(+), 27 deletions(-) mode change 100644 => 100755 KUBERNETES/Generic/.meta_Nodes.xml diff --git a/KUBERNETES/Generic/.meta_Nodes.xml b/KUBERNETES/Generic/.meta_Nodes.xml old mode 100644 new mode 100755 index c9b675e9..ada3e7a8 --- a/KUBERNETES/Generic/.meta_Nodes.xml +++ b/KUBERNETES/Generic/.meta_Nodes.xml @@ -3,7 +3,7 @@ DATE_MODIFICATION - 1605535459377 + 1611163277610 REPOSITORY @@ -11,19 +11,18 @@ DATE_CREATION - 1605535459251 + 1611163277603 - FILE_TYPE - text + MODEL + 20060101 TAG - string - MODEL - 20060101 + FILE_TYPE + text MANUFACTURER @@ -35,7 +34,6 @@ COMMENT - string diff --git a/KUBERNETES/Generic/.meta_k8_pods_list.xml b/KUBERNETES/Generic/.meta_k8_pods_list.xml index 8526ce6d..5f0e7aa8 100755 --- a/KUBERNETES/Generic/.meta_k8_pods_list.xml +++ b/KUBERNETES/Generic/.meta_k8_pods_list.xml @@ -3,7 +3,7 @@ DATE_MODIFICATION - 1605543793138 + 1611163357226 REPOSITORY @@ -11,7 +11,7 @@ DATE_CREATION - 1605543793131 + 1611163357219 MODEL diff --git a/KUBERNETES/Generic/Nodes.xml b/KUBERNETES/Generic/Nodes.xml index 452329de..9283e3ba 100644 --- a/KUBERNETES/Generic/Nodes.xml +++ b/KUBERNETES/Generic/Nodes.xml @@ -27,6 +27,14 @@ + + + + + + + + @@ -42,14 +50,54 @@ @<name>(?<node>.*)</name>@ //row/metadata/name + + + @<osImage>(?<osImage>.*)</osImage>@ + //row/status/nodeInfo/osImage + + + + @<kernelVersion>(?<kernelVersion>.*)</kernelVersion>@ + //row/status/nodeInfo/kernelVersion + + + + @<containerRuntimeVersion>(?<containerRuntimeVersion>.*)</containerRuntimeVersion>@ + //row/status/nodeInfo/containerRuntimeVersion + + + + @<kubeletVersion>(?<kubeletVersion>.*)</kubeletVersion>@ + //row/status/nodeInfo/kubeletVersion + + + + @<cpu>(?<cpu>.*)</cpu>@ + //row/status/capacity/cpu + + + + @<ephemeral-storage>(?<ephemeralStorage>.*)</ephemeral-storage>@ + //row/status/capacity/ephemeral-storage + + + + @<memory>(?<memory>.*)</memory>@ + //row/status/capacity/memory + + + + @<pods>(?<pods>.*)</pods>@ + //row/status/capacity/pods + /api/v1/nodes/ - - + + diff --git a/KUBERNETES/Generic/k8_pods_list.xml b/KUBERNETES/Generic/k8_pods_list.xml index 6c200831..cc8624f3 100755 --- a/KUBERNETES/Generic/k8_pods_list.xml +++ b/KUBERNETES/Generic/k8_pods_list.xml @@ -5,7 +5,7 @@ object_id 10000 - 0 + 5 xml @@ -26,41 +26,41 @@ - + + Pods - + Pods - - nginx - alpine - haproxy - httpd - hello-world - bash - php - Pods - + Pods - + Pods + + nginx + alpine + haproxy + httpd + hello-world + bash + php + - From 17cb676e6e6bff5ac46daf5596190175f1b838f2 Mon Sep 17 00:00:00 2001 From: Dmitrii Overchenko <49155524+n1654@users.noreply.github.com> Date: Thu, 21 Jan 2021 12:09:46 +0300 Subject: [PATCH 3/3] uppercase for var names fixed --- KUBERNETES/Generic/Nodes.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/KUBERNETES/Generic/Nodes.xml b/KUBERNETES/Generic/Nodes.xml index 9283e3ba..e894d6d7 100644 --- a/KUBERNETES/Generic/Nodes.xml +++ b/KUBERNETES/Generic/Nodes.xml @@ -26,15 +26,15 @@ - + - - - - + + + +