Autore Topic: Best practices for alerting on metrics with Azure Database for PostgreSQL monitoring  (Letto 106 volte)

0 Utenti e 1 Visitatore stanno visualizzando questo topic.

Offline Flavio58

Advertisement
Best practices for alerting on metrics with Azure Database for PostgreSQL monitoring

Whether you are a developer, database administrator, site reliability engineer, or a DevOps professional at your company, monitoring databases is an important part of maintaining the reliability, availability, and performance of your PostgreSQL server.
     

Whether you are a developer, database administrator, site reliability engineer, or a DevOps professional, monitoring databases is an important part of maintaining the reliability, availability, and performance of your PostgreSQL server. There are various metrics available for you in Microsoft Azure Database for PostgreSQL to get insights on the behavior of the server. You can also set alerts on these metrics using the Azure portal or Azure CLI.



MyServer - Alert rules



With modern applications evolving from a traditional on-premises approach to becoming more hybrid or cloud-native, there is also a need to adopt some best practices for a successful monitoring strategy on a hybrid and public cloud. Here are some example best practices for using monitoring data on your PostgreSQL server, and areas you can consider improving based on these various metrics.



Active connections



Sample threshold (percentage or value): 80 percent of total connection limit for greater than or equal to 30 minutes, checked every five minutes.



Things to check:




  • If you notice that active connections are at 80 percent of the total limit for the past half hour, verify if this is expected based on the workload.

  • If you think the load is expected, active connections limit can be increased by upgrading the pricing tier or vCores. You can check active connection limits for each SKU.



Active Connections



Failed connections



Sample threshold (percentage or value): 10 failed connections in the last 30 minutes, checked every 5 minutes.



Things to check:




  • If you see connection request failures over the last half hour, verify if this is expected by checking the logs for failure reasons.



Failed Connections




  • If this is a user error, take the appropriate action. For example, if there is an authentication failed error, check your username/password.

  • If the error is SSL related, check that the SSL settings and input parameters are properly configured.

    • For Example: psql "sslmode=verify-ca sslrootcert=root.crt host=mydemoserver.postgres.database.azure.com dbname=postgres user=mylogin@mydemoserver"





CPU percent or memory percent



Sample threshold (percentage or value): 100 percent for 5 minutes or 95 percent for more than two hours.



Things to check:




  • If you have hit 100 percent CPU or memory usage, check your application telemetry or logs to understand the impact of the errors.

  • Review the number of active connections. Check for connection limits. If your application has exceeded the maximum connections or is reaching the limits, then consider scaling up computing.

  • Another tool to help manage your application and optimize your workload is Query Performance Insights. Refer to the Query Store and its usage scenario.



Query Performance Insight



IO percent



Sample threshold (percentage or value): 90 percent usage for greater than or equal to 60 minutes.



Things to check:




  • If you see that IOPS is at 90 percent for one hour or more, verify if this is expected based on the application workload.

  • If you expect a high load, then increase the IOPS limit by increasing storage. Storage to IOPS mapping is below for reference.



Storage



The storage you provision is the amount of storage capacity available to your Azure Database for PostgreSQL server. The storage is used for the database files, temporary files, transaction logs, and the PostgreSQL server logs. The total amount of storage you provision also defines the I/O capacity available to your server.




































  Basic General purpose Memory optimized
Storage type Azure Standard Storage Azure Premium Storage Azure Premium Storage
Storage size 5GB TO 1TB 5GB to 4TB 5GB to 4TB
Storage increment size 1GB 1GB 1GB
IOPS Variable

3IOPS/GB



Min 100 IOPS



Max 6000 IOPS



3IOPS/GB



Min 100 IOPS



Max 6000 IOPS




You can add additional storage capacity during and after the creation of the server. The Basic tier does not provide an IOPS guarantee. In the General purpose and Memory optimized pricing tiers, the IOPS scale with the provisioned storage size in a three to one ratio.



Storage percent



Sample threshold (percentage or value):




  • Less than or equal to 10GB, 80 percent threshold.

  • Less than or equal to 100GB, 90 percent threshold.

  • Everything else, 95 percent threshold.



Things to check:




  • If your server is reaching provisioned storage limits, it will soon be out of space and set to read-only.

  • Monitor your usage and you can also provision for more storage to continue using the server without deleting any files, logs, and more.



If you have tried everything and none of the monitoring tips mentioned above lead you to a resolution, please don't hesitate to contact Microsoft Azure Support for assistance.



Acknowledgments



Special thanks to Anandsagar Kothapalli, Bassu Hiremath, Kalyan Sayyaparaju, Parikshit Savjani, and Praveen Barli for their contributions to this posting.


Source: Best practices for alerting on metrics with Azure Database for PostgreSQL monitoring


Consulente in Informatica dal 1984

Software automazione, progettazione elettronica, computer vision, intelligenza artificiale, IoT, sicurezza informatica, tecnologie di sicurezza militare, SIGINT. 

Facebook:https://www.facebook.com/flaviobernardotti58
Twitter : https://www.twitter.com/Flavio58

Cell:  +39 366 3416556

f.bernardotti@deeplearningitalia.eu

#deeplearning #computervision #embeddedboard #iot #ai

 

Related Topics

  Oggetto / Aperto da Risposte Ultimo post
0 Risposte
75 Visite
Ultimo post Giugno 01, 2018, 01:01:07 pm
da Flavio58
0 Risposte
80 Visite
Ultimo post Settembre 25, 2018, 04:02:03 am
da Flavio58
0 Risposte
70 Visite
Ultimo post Ottobre 04, 2018, 08:05:26 pm
da Flavio58
0 Risposte
95 Visite
Ultimo post Ottobre 22, 2018, 06:09:48 pm
da Flavio58
0 Risposte
105 Visite
Ultimo post Novembre 06, 2018, 12:02:56 am
da Flavio58

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326