You are on page 1of 2

1. Vpn should be connected.

2. Port forwarding in terminal.

3. Run the top command ( to get the linux process). (cpu, memory, load average etc)

4. Vim /etc/hosts
Add the following,
127.0.0.1 grafana-openshift-infra.apps.access.redhat.com prom-prometheus-
project.apps.access.redhat.com master.access.redhat.com

5. Go to browser and copy the link grafana

6. Alert (Heart shape of different color for data sources)


Green color – ok
Red color – alert
Orange – no data
Yellow – pending state

7. For flushing
 We do flushing for those who are red color

 Click the metric button ( these three will be seen, namespace, podname and data source)

 Then we will move our cursor on graph to ckeck whether any pod size is full or not.

 To check the pod size we have to click on alert button.

 Here nsiver pod is 45 if it get increase then our data source will be in red color.

 Open the terminal , run the following command ( which are in bold we have to change
according )
for pod in `oc get pods -l app=ssnsp1718 -o name -n scholarships`; do oc rsh -n
scholarships $pod /opt/eap/bin/jboss-cli.sh -c "/subsystem=datasources/data-
source=nspds_201718_postgresql2-SSNSP17182:flush-all-connection-in-pool" ;done

 If pod size is not reduced by running this command, then we will recreate the pod

 to recreate the pod we have to check the pod,


oc get pods -l app=nspadmin -o wide -n nspadmin (to check the running pod)

oc delete pods running_pod_ka_naam -n scholarships

 to check whether pod is recreated or not,


for pod in `oc get pods -l app=ssnsp1718 -o name -n scholarships`; do oc rsh -n
scholarships $pod /opt/eap/bin/jboss-cli.sh -c "/subsystem=datasources/data-
source=nspds_201718_postgresql2-SSNSP17182:flush-all-connection-in-pool" ;done

You might also like