Skip to content

Commit d91dbe2

Browse files
committedFeb 1, 2022
Observe_sys_policy script modified to support no inputs as well
Signed-off-by: Eswar Rajan Subramanian <eswar@accuknox.com>
1 parent d224c1b commit d91dbe2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed
 

‎scripts/observe_sys_data.sh

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/bash
22

33
## Run script command in below format
4-
## ./scripts/get_sys_observability_data.sh clustername:default containername:wordpress namespace:wordpress-mysql labels:app=mysql
5-
6-
usage()
7-
{
8-
echo "Usage: $0 --containername <name> --clustername <name> --namespace <namespace> --labels <labels> "
9-
}
4+
## ./scripts/get_sys_observability_data.sh --clustername default --containername wordpress --namespace wordpress-mysql --labels app=mysql
105

116
OPTS=`getopt -o s: --long containername: --long clustername: --long namespace: --long labels: -n 'parse-options' -- "$@"`
127
eval set -- "$OPTS"
@@ -21,8 +16,6 @@ while true; do
2116
esac
2217
done
2318

24-
[[ "$CLUSTER_NAME" == "" ]] && [[ "$CONTAINER_NAME" == "" ]] && [[ "$NAMESPACE" == "" ]] && [[ "$LABELS" == "" ]] && usage
25-
2619
DATA='{"clusterName": "'$CLUSTER_NAME'", "namespace":"'$NAMESPACE'", "containerName":"'$CONTAINER_NAME'", "labels":"'$LABELS'"}'
2720

2821
grpcurl -plaintext -d "$DATA" localhost:9089 v1.observability.Observability.GetSysObservabilityData

0 commit comments

Comments
 (0)
Please sign in to comment.