You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manageability-and-operations/observability-and-manageability/oci-monitoring/custom-metrics/custom-metric-python-SDK-services-limit-monitoring/README.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,9 @@ Basically the **logic** is:
40
40
41
41
````
42
42
Start
43
+
Parse input arguments (compartment_ocid, region)
43
44
Setup the OCI connection authentication (OCI IAM Config or Instance Principals)
44
-
Set compartment_ocid
45
-
Initialize the clients for the different API calls (IAM, Monitoring, Service Limits)
45
+
Initialise the clients for the different API calls (IAM, Monitoring, Service Limits)
46
46
Gather the full list of Service Limits Definitions sorted by Service Limit name
47
47
For the list of Service Limit names
48
48
If the scope is Availability Domain
@@ -55,27 +55,7 @@ For the list of Service Limit names
55
55
End
56
56
````
57
57
58
-
## 4. GETTING STARTED
59
-
60
-
To execute the script:
61
-
62
-
1. Ensure that the requirements are met with your desired variant (using IAM user or Instance Principals)
63
-
2. Upload the script into your administration VM inside OCI (IAM user or Instance Principals), or outside OCI (IAM user only)
64
-
3. Edit the script and put your OCI tenancy root compartment OCID in the compartment_ocid variable
65
-
4. To execute the script:
66
-
* For the IAM User principals authentication method, execute:
67
-
````
68
-
$ python3 serviceLimitsMetricsIAM.py
69
-
````
70
-
* The script is available [here](./files/Scripts/postServiceLimitsMetricsIAM.py)
71
-
* For the Instance principal authentication method, execute:
72
-
````
73
-
$ python3 serviceLimitsMetricsIP.py
74
-
````
75
-
* The script is available [here](./files/Scripts/postServiceLimitsMetricsIP.py)
76
-
77
-
78
-
## 5. REQUIREMENTS
58
+
## 4. REQUIREMENTS
79
59
80
60
We have different requirements depending on the variant of this asset that we would use:
81
61
@@ -98,16 +78,37 @@ We have different requirements depending on the variant of this asset that we wo
98
78
The VM where to run the script must have installed python3 with the following required packages installed with pip:
99
79
***oci**
100
80
101
-
## 6. INPUT
81
+
## 5. INPUT
102
82
103
-
The required input is the ***compartment_ocid*** with the OCID of your tenancy root compartment. Replace the value of the variable at the beginning of the script.
83
+
The required input arguments are:
104
84
105
-
## 7. OUTPUT
85
+
***compartment_ocid** with the OCID of your tenancy root compartment.
86
+
***region** where you want to get the Services Limits with regional scope and where to publish metrics
87
+
88
+
## 6. OUTPUT
106
89
107
90
Every time the script is run, it will feed a custom metric namespace called "**limits_metrics**" in the tenancy's root compartment with the information of the Services Limits usage.
108
91
109
92
You can check the custom metric extension from the OCI Metrics Explorer, where you will be able also to create an alarms from an specific metric query.
110
93
94
+
## 7. GETTING STARTED
95
+
96
+
To execute the script:
97
+
98
+
1. Ensure that the requirements are met with your desired variant (using IAM user or Instance Principals)
99
+
2. Upload the script into your administration VM inside OCI (IAM user or Instance Principals), or outside OCI (IAM user only)
100
+
3. To execute the script:
101
+
* For the IAM User principals authentication method, execute:
0 commit comments