actuator.html 295.8 KB
Newer Older
茶陵後's avatar
茶陵後 已提交
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 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Production-ready Features | Spring Docs</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" type="image/png" sizes="16x16" href="/images/icons/favicon.ico">
    <link rel="icon" type="image/png" sizes="48x48" href="/images/icons/icon-48x48.png">
    <link rel="icon" type="image/png" sizes="72x72" href="/images/icons/icon-72x72.png">
    <link rel="manifest" href="/manifest.webmanifest">
    <link rel="apple-touch-icon" href="/images/icons/icon_48x48.png">
    <link rel="mask-icon" href="/images/icons/favicon.ico" color="#5dac38">
    <script>
    var _hmt = _hmt || [];
    (function () {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?8eefd6b163dcb3f5762af6b0825e2dd1";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
    <meta name="description" content="Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.
You can choose to manage and monitor your application by using HTTP endpoints or with JMX.
Auditing, health, and metrics gathering can also be automatically applied to your application.">
    <meta name="twitter:title" content="Production-ready Features">
    <meta name="twitter:description" content="Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.
You can choose to manage and monitor your application by using HTTP endpoints or with JMX.
Auditing, health, and metrics gathering can also be automatically applied to your application.">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:url" content="https://spring.gitcode.net/en/spring-boot/actuator.html">
    <meta property="og:type" content="article">
    <meta property="og:title" content="Production-ready Features">
    <meta property="og:description" content="Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.
You can choose to manage and monitor your application by using HTTP endpoints or with JMX.
Auditing, health, and metrics gathering can also be automatically applied to your application.">
    <meta property="og:url" content="https://spring.gitcode.net/en/spring-boot/actuator.html">
    <meta property="og:site_name" content="Spring 中文文档社区">
    <meta itemprop="name" content="Production-ready Features">
    <meta itemprop="description" content="Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.
You can choose to manage and monitor your application by using HTTP endpoints or with JMX.
Auditing, health, and metrics gathering can also be automatically applied to your application.">
    <meta name="application-name" content="Spring 中文文档社区">
    <meta name="apple-mobile-web-app-title" content="Spring 中文社区">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="msapplication-TileColor" content="#5dac38">
    <meta name="theme-color" content="#5dac38">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="baidu-site-verification" content="code-tApgxyb9G8">
    
    <link rel="preload" href="/assets/css/0.styles.af3770e9.css" as="style"><link rel="preload" href="/assets/js/app.cf11b18e.js" as="script"><link rel="preload" href="/assets/js/3.50918073.js" as="script"><link rel="preload" href="/assets/js/4.cd4c3ff4.js" as="script"><link rel="preload" href="/assets/js/43.bbf1f09a.js" as="script"><link rel="prefetch" href="/assets/js/10.675f4d7e.js"><link rel="prefetch" href="/assets/js/100.89ddf0f9.js"><link rel="prefetch" href="/assets/js/101.a2584c55.js"><link rel="prefetch" href="/assets/js/102.53225958.js"><link rel="prefetch" href="/assets/js/103.be06048d.js"><link rel="prefetch" href="/assets/js/104.a2328e06.js"><link rel="prefetch" href="/assets/js/105.78529341.js"><link rel="prefetch" href="/assets/js/106.fc779386.js"><link rel="prefetch" href="/assets/js/107.375c8dec.js"><link rel="prefetch" href="/assets/js/108.cf4ca7e2.js"><link rel="prefetch" href="/assets/js/109.f4d3964d.js"><link rel="prefetch" href="/assets/js/11.b58e279a.js"><link rel="prefetch" href="/assets/js/110.4ae56c4d.js"><link rel="prefetch" href="/assets/js/111.baf7121d.js"><link rel="prefetch" href="/assets/js/112.a963ade8.js"><link rel="prefetch" href="/assets/js/113.edbb458c.js"><link rel="prefetch" href="/assets/js/114.7e2b354f.js"><link rel="prefetch" href="/assets/js/115.4e41285c.js"><link rel="prefetch" href="/assets/js/116.1ee84ed6.js"><link rel="prefetch" href="/assets/js/117.4952cce2.js"><link rel="prefetch" href="/assets/js/118.306eabfa.js"><link rel="prefetch" href="/assets/js/119.5a4712e9.js"><link rel="prefetch" href="/assets/js/12.c41ab7bc.js"><link rel="prefetch" href="/assets/js/120.496c9660.js"><link rel="prefetch" href="/assets/js/121.e4a22135.js"><link rel="prefetch" href="/assets/js/122.02f82a94.js"><link rel="prefetch" href="/assets/js/123.53c5a24e.js"><link rel="prefetch" href="/assets/js/124.11d8be3e.js"><link rel="prefetch" href="/assets/js/125.c0740874.js"><link rel="prefetch" href="/assets/js/126.9cb2911c.js"><link rel="prefetch" href="/assets/js/127.6f87a638.js"><link rel="prefetch" href="/assets/js/128.456206df.js"><link rel="prefetch" href="/assets/js/129.ce51dc7d.js"><link rel="prefetch" href="/assets/js/13.1147a447.js"><link rel="prefetch" href="/assets/js/130.66718f4c.js"><link rel="prefetch" href="/assets/js/131.713226b7.js"><link rel="prefetch" href="/assets/js/132.6e2b68e3.js"><link rel="prefetch" href="/assets/js/133.11148e38.js"><link rel="prefetch" href="/assets/js/134.8de25763.js"><link rel="prefetch" href="/assets/js/135.961f6693.js"><link rel="prefetch" href="/assets/js/136.8abc4532.js"><link rel="prefetch" href="/assets/js/137.331bfb6b.js"><link rel="prefetch" href="/assets/js/138.f76ee7b9.js"><link rel="prefetch" href="/assets/js/139.578aa70e.js"><link rel="prefetch" href="/assets/js/14.1c437f54.js"><link rel="prefetch" href="/assets/js/140.9f1f28a0.js"><link rel="prefetch" href="/assets/js/141.b08ac1ec.js"><link rel="prefetch" href="/assets/js/142.e5c934cf.js"><link rel="prefetch" href="/assets/js/143.2a9d47c6.js"><link rel="prefetch" href="/assets/js/144.76090f65.js"><link rel="prefetch" href="/assets/js/145.41a54d41.js"><link rel="prefetch" href="/assets/js/146.979b34c1.js"><link rel="prefetch" href="/assets/js/147.46e366af.js"><link rel="prefetch" href="/assets/js/148.efcd2b17.js"><link rel="prefetch" href="/assets/js/149.04135c0b.js"><link rel="prefetch" href="/assets/js/15.cbd21f6a.js"><link rel="prefetch" href="/assets/js/150.679d76bf.js"><link rel="prefetch" href="/assets/js/151.2b0748da.js"><link rel="prefetch" href="/assets/js/152.cee5bbcd.js"><link rel="prefetch" href="/assets/js/153.680b4156.js"><link rel="prefetch" href="/assets/js/154.0c6972fe.js"><link rel="prefetch" href="/assets/js/155.35a3e5ab.js"><link rel="prefetch" href="/assets/js/156.6782d874.js"><link rel="prefetch" href="/assets/js/157.b9fe2583.js"><link rel="prefetch" href="/assets/js/158.96656194.js"><link rel="prefetch" href="/assets/js/159.2a0f7744.js"><link rel="prefetch" href="/assets/js/16.0cc4679e.js"><link rel="prefetch" href="/assets/js/160.c26bf909.js"><link rel="prefetch" href="/assets/js/161.45a3950a.js"><link rel="prefetch" href="/assets/js/162.4a08c069.js"><link rel="prefetch" href="/assets/js/163.a540d00c.js"><link rel="prefetch" href="/assets/js/164.117eb7b8.js"><link rel="prefetch" href="/assets/js/165.4fabe2ea.js"><link rel="prefetch" href="/assets/js/166.27d3bfe9.js"><link rel="prefetch" href="/assets/js/167.c8a74627.js"><link rel="prefetch" href="/assets/js/168.e16111b9.js"><link rel="prefetch" href="/assets/js/169.458ea1d8.js"><link rel="prefetch" href="/assets/js/17.d3f5977b.js"><link rel="prefetch" href="/assets/js/170.4b38adcf.js"><link rel="prefetch" href="/assets/js/171.98cb45b7.js"><link rel="prefetch" href="/assets/js/172.9ca2eb1a.js"><link rel="prefetch" href="/assets/js/173.14074c7f.js"><link rel="prefetch" href="/assets/js/174.8e1f9887.js"><link rel="prefetch" href="/assets/js/175.5989a4ca.js"><link rel="prefetch" href="/assets/js/176.89b35f24.js"><link rel="prefetch" href="/assets/js/177.8ca04666.js"><link rel="prefetch" href="/assets/js/178.f1f78ad5.js"><link rel="prefetch" href="/assets/js/179.a1faadfe.js"><link rel="prefetch" href="/assets/js/18.1a2bbade.js"><link rel="prefetch" href="/assets/js/180.33be0a0d.js"><link rel="prefetch" href="/assets/js/181.074198fc.js"><link rel="prefetch" href="/assets/js/182.2ea92f58.js"><link rel="prefetch" href="/assets/js/183.316f0529.js"><link rel="prefetch" href="/assets/js/184.f6dd5f36.js"><link rel="prefetch" href="/assets/js/185.134f1457.js"><link rel="prefetch" href="/assets/js/186.2aa74077.js"><link rel="prefetch" href="/assets/js/187.3a956aba.js"><link rel="prefetch" href="/assets/js/188.01a6573f.js"><link rel="prefetch" href="/assets/js/189.a8d65b4d.js"><link rel="prefetch" href="/assets/js/19.e062ea88.js"><link rel="prefetch" href="/assets/js/190.c753d8e3.js"><link rel="prefetch" href="/assets/js/191.280fe1e2.js"><link rel="prefetch" href="/assets/js/192.bbc94e32.js"><link rel="prefetch" href="/assets/js/193.41421d14.js"><link rel="prefetch" href="/assets/js/194.15f508e4.js"><link rel="prefetch" href="/assets/js/195.a17f3877.js"><link rel="prefetch" href="/assets/js/196.d17bfcdf.js"><link rel="prefetch" href="/assets/js/197.65791a5a.js"><link rel="prefetch" href="/assets/js/198.0441041e.js"><link rel="prefetch" href="/assets/js/199.538f2285.js"><link rel="prefetch" href="/assets/js/20.6c49f026.js"><link rel="prefetch" href="/assets/js/200.4ff8dbc4.js"><link rel="prefetch" href="/assets/js/201.088ccf86.js"><link rel="prefetch" href="/assets/js/202.8bdad311.js"><link rel="prefetch" href="/assets/js/203.45d3ecc5.js"><link rel="prefetch" href="/assets/js/204.c403aa39.js"><link rel="prefetch" href="/assets/js/205.e992b689.js"><link rel="prefetch" href="/assets/js/206.eed8bd42.js"><link rel="prefetch" href="/assets/js/207.3db1fc87.js"><link rel="prefetch" href="/assets/js/208.27399a7b.js"><link rel="prefetch" href="/assets/js/209.829f007c.js"><link rel="prefetch" href="/assets/js/21.0ed0e55b.js"><link rel="prefetch" href="/assets/js/210.35079683.js"><link rel="prefetch" href="/assets/js/211.94056191.js"><link rel="prefetch" href="/assets/js/212.431059ab.js"><link rel="prefetch" href="/assets/js/213.4d25e21f.js"><link rel="prefetch" href="/assets/js/214.e62f8fc5.js"><link rel="prefetch" href="/assets/js/215.433d7113.js"><link rel="prefetch" href="/assets/js/216.6de56c4d.js"><link rel="prefetch" href="/assets/js/217.ad3e1cd0.js"><link rel="prefetch" href="/assets/js/218.c225521d.js"><link rel="prefetch" href="/assets/js/219.f4241738.js"><link rel="prefetch" href="/assets/js/22.3563c6e0.js"><link rel="prefetch" href="/assets/js/220.ac9c6899.js"><link rel="prefetch" href="/assets/js/221.ff4ee0d2.js"><link rel="prefetch" href="/assets/js/222.20629300.js"><link rel="prefetch" href="/assets/js/223.a5fa0166.js"><link rel="prefetch" href="/assets/js/224.65290c4f.js"><link rel="prefetch" href="/assets/js/225.e698f717.js"><link rel="prefetch" href="/assets/js/226.4b28f10d.js"><link rel="prefetch" href="/assets/js/227.f44065ae.js"><link rel="prefetch" href="/assets/js/228.0b254d68.js"><link rel="prefetch" href="/assets/js/229.560ccb5c.js"><link rel="prefetch" href="/assets/js/23.2bc6a9e3.js"><link rel="prefetch" href="/assets/js/230.2e09449c.js"><link rel="prefetch" href="/assets/js/231.b09e3f00.js"><link rel="prefetch" href="/assets/js/232.eaa54385.js"><link rel="prefetch" href="/assets/js/233.36843a48.js"><link rel="prefetch" href="/assets/js/234.1e3e41c7.js"><link rel="prefetch" href="/assets/js/235.2dff4846.js"><link rel="prefetch" href="/assets/js/236.bb6fd980.js"><link rel="prefetch" href="/assets/js/237.e97364da.js"><link rel="prefetch" href="/assets/js/238.d8ce22f3.js"><link rel="prefetch" href="/assets/js/239.be791e5e.js"><link rel="prefetch" href="/assets/js/24.4b60795e.js"><link rel="prefetch" href="/assets/js/240.3927116f.js"><link rel="prefetch" href="/assets/js/241.6539a7f9.js"><link rel="prefetch" href="/assets/js/242.1241e424.js"><link rel="prefetch" href="/assets/js/243.a07d3be3.js"><link rel="prefetch" href="/assets/js/244.f98f98a1.js"><link rel="prefetch" href="/assets/js/245.ecb7c922.js"><link rel="prefetch" href="/assets/js/246.95ed23ce.js"><link rel="prefetch" href="/assets/js/247.fb5d42c6.js"><link rel="prefetch" href="/assets/js/248.f7b4f364.js"><link rel="prefetch" href="/assets/js/249.ac22d922.js"><link rel="prefetch" href="/assets/js/25.ef18cc01.js"><link rel="prefetch" href="/assets/js/250.01fbf76b.js"><link rel="prefetch" href="/assets/js/251.08f19bbd.js"><link rel="prefetch" href="/assets/js/252.9f11061d.js"><link rel="prefetch" href="/assets/js/253.cd7f85b9.js"><link rel="prefetch" href="/assets/js/254.2493e550.js"><link rel="prefetch" href="/assets/js/255.ac6d41ee.js"><link rel="prefetch" href="/assets/js/256.068eb5a6.js"><link rel="prefetch" href="/assets/js/257.b108c715.js"><link rel="prefetch" href="/assets/js/258.d614b5d4.js"><link rel="prefetch" href="/assets/js/259.87ba5ef3.js"><link rel="prefetch" href="/assets/js/26.5baa4d2c.js"><link rel="prefetch" href="/assets/js/260.c771e39d.js"><link rel="prefetch" href="/assets/js/261.0dbaf460.js"><link rel="prefetch" href="/assets/js/262.35e64a26.js"><link rel="prefetch" href="/assets/js/263.c16fca32.js"><link rel="prefetch" href="/assets/js/264.ea414912.js"><link rel="prefetch" href="/assets/js/265.f2e0d5bb.js"><link rel="prefetch" href="/assets/js/266.629a2d15.js"><link rel="prefetch" href="/assets/js/267.c7332e80.js"><link rel="prefetch" href="/assets/js/268.8be99f76.js"><link rel="prefetch" href="/assets/js/269.452ff2d4.js"><link rel="prefetch" href="/assets/js/27.2a2950d8.js"><link rel="prefetch" href="/assets/js/270.a5c429cb.js"><link rel="prefetch" href="/assets/js/271.1ad3cd83.js"><link rel="prefetch" href="/assets/js/272.354cef59.js"><link rel="prefetch" href="/assets/js/273.681156b7.js"><link rel="prefetch" href="/assets/js/274.6c51e7ae.js"><link rel="prefetch" href="/assets/js/275.24ef01b4.js"><link rel="prefetch" href="/assets/js/276.afeb2acd.js"><link rel="prefetch" href="/assets/js/277.6472c22d.js"><link rel="prefetch" href="/assets/js/278.416d9788.js"><link rel="prefetch" href="/assets/js/279.c190fbc9.js"><link rel="prefetch" href="/assets/js/28.6320d8c1.js"><link rel="prefetch" href="/assets/js/280.28b1b955.js"><link rel="prefetch" href="/assets/js/281.77afd7c5.js"><link rel="prefetch" href="/assets/js/282.eee0e9c0.js"><link rel="prefetch" href="/assets/js/283.e59fb0e5.js"><link rel="prefetch" href="/assets/js/284.9c6ff275.js"><link rel="prefetch" href="/assets/js/285.3e2d030a.js"><link rel="prefetch" href="/assets/js/286.d7562f9b.js"><link rel="prefetch" href="/assets/js/287.9e228e80.js"><link rel="prefetch" href="/assets/js/288.f9448d7d.js"><link rel="prefetch" href="/assets/js/289.30726f95.js"><link rel="prefetch" href="/assets/js/29.a420635f.js"><link rel="prefetch" href="/assets/js/290.f79765e2.js"><link rel="prefetch" href="/assets/js/291.0943618c.js"><link rel="prefetch" href="/assets/js/292.bd04f6db.js"><link rel="prefetch" href="/assets/js/293.776f4c0d.js"><link rel="prefetch" href="/assets/js/294.54e52863.js"><link rel="prefetch" href="/assets/js/295.bd033d69.js"><link rel="prefetch" href="/assets/js/296.1090c539.js"><link rel="prefetch" href="/assets/js/297.ec37f6e8.js"><link rel="prefetch" href="/assets/js/298.fa434214.js"><link rel="prefetch" href="/assets/js/299.50bd7c87.js"><link rel="prefetch" href="/assets/js/30.6c81ca7b.js"><link rel="prefetch" href="/assets/js/300.7a2c6632.js"><link rel="prefetch" href="/assets/js/301.4ae4e645.js"><link rel="prefetch" href="/assets/js/302.e1ef7459.js"><link rel="prefetch" href="/assets/js/303.3894068b.js"><link rel="prefetch" href="/assets/js/304.840b09e3.js"><link rel="prefetch" href="/assets/js/305.40ec0bf6.js"><link rel="prefetch" href="/assets/js/306.9fa4d8aa.js"><link rel="prefetch" href="/assets/js/307.33656e76.js"><link rel="prefetch" href="/assets/js/308.19398f71.js"><link rel="prefetch" href="/assets/js/309.bde6f12f.js"><link rel="prefetch" href="/assets/js/31.2b4f2752.js"><link rel="prefetch" href="/assets/js/310.69ced632.js"><link rel="prefetch" href="/assets/js/311.c8e57d0e.js"><link rel="prefetch" href="/assets/js/312.80c4d6a7.js"><link rel="prefetch" href="/assets/js/313.14060a06.js"><link rel="prefetch" href="/assets/js/314.29165d83.js"><link rel="prefetch" href="/assets/js/315.901aabf1.js"><link rel="prefetch" href="/assets/js/316.7f0d18e3.js"><link rel="prefetch" href="/assets/js/317.112de6ec.js"><link rel="prefetch" href="/assets/js/318.091ea533.js"><link rel="prefetch" href="/assets/js/319.25ca175e.js"><link rel="prefetch" href="/assets/js/32.ab03e16f.js"><link rel="prefetch" href="/assets/js/320.b89e85c9.js"><link rel="prefetch" href="/assets/js/321.69316136.js"><link rel="prefetch" href="/assets/js/322.567512f0.js"><link rel="prefetch" href="/assets/js/323.2d67bb75.js"><link rel="prefetch" href="/assets/js/324.c41411db.js"><link rel="prefetch" href="/assets/js/325.a412ca77.js"><link rel="prefetch" href="/assets/js/326.22408ce6.js"><link rel="prefetch" href="/assets/js/327.33524443.js"><link rel="prefetch" href="/assets/js/328.561ebeb1.js"><link rel="prefetch" href="/assets/js/329.d7a280e4.js"><link rel="prefetch" href="/assets/js/33.199f45ed.js"><link rel="prefetch" href="/assets/js/330.d01a7e1b.js"><link rel="prefetch" href="/assets/js/331.a3ad2556.js"><link rel="prefetch" href="/assets/js/332.36ad912a.js"><link rel="prefetch" href="/assets/js/333.2fb229c4.js"><link rel="prefetch" href="/assets/js/334.d170f507.js"><link rel="prefetch" href="/assets/js/335.90ca0539.js"><link rel="prefetch" href="/assets/js/336.454d4374.js"><link rel="prefetch" href="/assets/js/337.dba45eb4.js"><link rel="prefetch" href="/assets/js/338.c8e4ba66.js"><link rel="prefetch" href="/assets/js/339.ae85118e.js"><link rel="prefetch" href="/assets/js/34.d0c7a02e.js"><link rel="prefetch" href="/assets/js/340.7033b85b.js"><link rel="prefetch" href="/assets/js/341.13cfe1aa.js"><link rel="prefetch" href="/assets/js/342.b33302b5.js"><link rel="prefetch" href="/assets/js/343.946f30dc.js"><link rel="prefetch" href="/assets/js/344.b2add405.js"><link rel="prefetch" href="/assets/js/345.12433fa3.js"><link rel="prefetch" href="/assets/js/346.b1bdfeba.js"><link rel="prefetch" href="/assets/js/347.53530bff.js"><link rel="prefetch" href="/assets/js/348.48aa580e.js"><link rel="prefetch" href="/assets/js/349.53c4baca.js"><link rel="prefetch" href="/assets/js/35.5512348f.js"><link rel="prefetch" href="/assets/js/350.e4b2d6e6.js"><link rel="prefetch" href="/assets/js/351.d41b01c1.js"><link rel="prefetch" href="/assets/js/352.1c4d1250.js"><link rel="prefetch" href="/assets/js/353.7fd27c0f.js"><link rel="prefetch" href="/assets/js/354.47199c90.js"><link rel="prefetch" href="/assets/js/355.68bccab4.js"><link rel="prefetch" href="/assets/js/356.e3602eb5.js"><link rel="prefetch" href="/assets/js/357.cd5ce764.js"><link rel="prefetch" href="/assets/js/358.bee621d4.js"><link rel="prefetch" href="/assets/js/359.648aa4f0.js"><link rel="prefetch" href="/assets/js/36.bdebdf29.js"><link rel="prefetch" href="/assets/js/360.439f5fae.js"><link rel="prefetch" href="/assets/js/361.39f782b4.js"><link rel="prefetch" href="/assets/js/362.106acf4c.js"><link rel="prefetch" href="/assets/js/363.562a4e1e.js"><link rel="prefetch" href="/assets/js/364.5940b069.js"><link rel="prefetch" href="/assets/js/365.e429c365.js"><link rel="prefetch" href="/assets/js/366.cc650df8.js"><link rel="prefetch" href="/assets/js/367.347592c9.js"><link rel="prefetch" href="/assets/js/368.d68ce88d.js"><link rel="prefetch" href="/assets/js/369.034e7f1e.js"><link rel="prefetch" href="/assets/js/37.9d026956.js"><link rel="prefetch" href="/assets/js/370.ac6fc7a5.js"><link rel="prefetch" href="/assets/js/371.e70219a6.js"><link rel="prefetch" href="/assets/js/372.c449fc49.js"><link rel="prefetch" href="/assets/js/373.f07bea72.js"><link rel="prefetch" href="/assets/js/374.8152408f.js"><link rel="prefetch" href="/assets/js/375.63c70dab.js"><link rel="prefetch" href="/assets/js/376.06de19db.js"><link rel="prefetch" href="/assets/js/377.2319ddb1.js"><link rel="prefetch" href="/assets/js/378.4821e23c.js"><link rel="prefetch" href="/assets/js/379.54a13769.js"><link rel="prefetch" href="/assets/js/38.23e83578.js"><link rel="prefetch" href="/assets/js/380.dac4cd46.js"><link rel="prefetch" href="/assets/js/381.8f83d1d7.js"><link rel="prefetch" href="/assets/js/382.e76e7d88.js"><link rel="prefetch" href="/assets/js/383.df731ee4.js"><link rel="prefetch" href="/assets/js/384.5093369e.js"><link rel="prefetch" href="/assets/js/385.ee576341.js"><link rel="prefetch" href="/assets/js/386.087a29a9.js"><link rel="prefetch" href="/assets/js/387.9f44d03b.js"><link rel="prefetch" href="/assets/js/388.a3f70992.js"><link rel="prefetch" href="/assets/js/389.df6e2ced.js"><link rel="prefetch" href="/assets/js/39.e9699d7f.js"><link rel="prefetch" href="/assets/js/390.c377efca.js"><link rel="prefetch" href="/assets/js/391.d7747385.js"><link rel="prefetch" href="/assets/js/392.bf8e8c1a.js"><link rel="prefetch" href="/assets/js/393.b4ed3be0.js"><link rel="prefetch" href="/assets/js/394.48eb505a.js"><link rel="prefetch" href="/assets/js/395.d9cd4812.js"><link rel="prefetch" href="/assets/js/396.b386a6b5.js"><link rel="prefetch" href="/assets/js/397.d19960fa.js"><link rel="prefetch" href="/assets/js/398.15f66e2a.js"><link rel="prefetch" href="/assets/js/399.cc4af83b.js"><link rel="prefetch" href="/assets/js/40.3a541653.js"><link rel="prefetch" href="/assets/js/400.d99e4b93.js"><link rel="prefetch" href="/assets/js/401.13fa06dd.js"><link rel="prefetch" href="/assets/js/402.3629b866.js"><link rel="prefetch" href="/assets/js/403.5826b040.js"><link rel="prefetch" href="/assets/js/404.d4b35549.js"><link rel="prefetch" href="/assets/js/405.9142a002.js"><link rel="prefetch" href="/assets/js/406.ba50e04d.js"><link rel="prefetch" href="/assets/js/407.b5271c6f.js"><link rel="prefetch" href="/assets/js/408.18baa241.js"><link rel="prefetch" href="/assets/js/409.6151d46b.js"><link rel="prefetch" href="/assets/js/41.b10ef41f.js"><link rel="prefetch" href="/assets/js/410.bb1fd058.js"><link rel="prefetch" href="/assets/js/411.9273fd47.js"><link rel="prefetch" href="/assets/js/412.d6b790c1.js"><link rel="prefetch" href="/assets/js/413.4c5a30bb.js"><link rel="prefetch" href="/assets/js/414.01aa0e0a.js"><link rel="prefetch" href="/assets/js/415.2633ad61.js"><link rel="prefetch" href="/assets/js/416.7a2263a9.js"><link rel="prefetch" href="/assets/js/417.98368241.js"><link rel="prefetch" href="/assets/js/418.ffeb9c9c.js"><link rel="prefetch" href="/assets/js/419.633f9efe.js"><link rel="prefetch" href="/assets/js/42.aa8b7c99.js"><link rel="prefetch" href="/assets/js/420.69868f4a.js"><link rel="prefetch" href="/assets/js/421.937d87cc.js"><link rel="prefetch" href="/assets/js/422.375fe09b.js"><link rel="prefetch" href="/assets/js/423.8d335fd6.js"><link rel="prefetch" href="/assets/js/424.d5b181d7.js"><link rel="prefetch" href="/assets/js/425.e06749ea.js"><link rel="prefetch" href="/assets/js/426.d7a23361.js"><link rel="prefetch" href="/assets/js/427.c26079c3.js"><link rel="prefetch" href="/assets/js/428.788e60b3.js"><link rel="prefetch" href="/assets/js/429.212c3091.js"><link rel="prefetch" href="/assets/js/430.e156b1fa.js"><link rel="prefetch" href="/assets/js/431.b41e44c6.js"><link rel="prefetch" href="/assets/js/432.7534e280.js"><link rel="prefetch" href="/assets/js/433.3d203e2b.js"><link rel="prefetch" href="/assets/js/434.41bb5350.js"><link rel="prefetch" href="/assets/js/435.a5c93fd3.js"><link rel="prefetch" href="/assets/js/436.60910866.js"><link rel="prefetch" href="/assets/js/437.7ae74f40.js"><link rel="prefetch" href="/assets/js/438.dc802af3.js"><link rel="prefetch" href="/assets/js/439.0de7c2a4.js"><link rel="prefetch" href="/assets/js/44.c0079627.js"><link rel="prefetch" href="/assets/js/440.43bc725f.js"><link rel="prefetch" href="/assets/js/441.1402dd2a.js"><link rel="prefetch" href="/assets/js/442.6106e1be.js"><link rel="prefetch" href="/assets/js/443.40909ac7.js"><link rel="prefetch" href="/assets/js/444.e506898d.js"><link rel="prefetch" href="/assets/js/445.8636f7a3.js"><link rel="prefetch" href="/assets/js/446.de915ed4.js"><link rel="prefetch" href="/assets/js/447.c7ac8e6e.js"><link rel="prefetch" href="/assets/js/448.9797a750.js"><link rel="prefetch" href="/assets/js/449.5d1f4748.js"><link rel="prefetch" href="/assets/js/45.2a09d581.js"><link rel="prefetch" href="/assets/js/450.42babefe.js"><link rel="prefetch" href="/assets/js/451.ee1b8ff8.js"><link rel="prefetch" href="/assets/js/452.7536e7c2.js"><link rel="prefetch" href="/assets/js/453.39a21d52.js"><link rel="prefetch" href="/assets/js/454.6511d1e1.js"><link rel="prefetch" href="/assets/js/455.2abb8ea0.js"><link rel="prefetch" href="/assets/js/456.5724d799.js"><link rel="prefetch" href="/assets/js/457.c32c0755.js"><link rel="prefetch" href="/assets/js/458.f67c539b.js"><link rel="prefetch" href="/assets/js/459.1634e8da.js"><link rel="prefetch" href="/assets/js/46.58b302e4.js"><link rel="prefetch" href="/assets/js/460.a22ac002.js"><link rel="prefetch" href="/assets/js/461.2c152148.js"><link rel="prefetch" href="/assets/js/462.14b038cf.js"><link rel="prefetch" href="/assets/js/463.dd0a3a00.js"><link rel="prefetch" href="/assets/js/464.f22ba288.js"><link rel="prefetch" href="/assets/js/465.9c187041.js"><link rel="prefetch" href="/assets/js/466.9957dd67.js"><link rel="prefetch" href="/assets/js/467.047041e8.js"><link rel="prefetch" href="/assets/js/468.425b6f20.js"><link rel="prefetch" href="/assets/js/469.2f70ecf7.js"><link rel="prefetch" href="/assets/js/47.987d79be.js"><link rel="prefetch" href="/assets/js/470.602b7d98.js"><link rel="prefetch" href="/assets/js/471.ddabe1b6.js"><link rel="prefetch" href="/assets/js/472.3a1ad521.js"><link rel="prefetch" href="/assets/js/473.2be352ab.js"><link rel="prefetch" href="/assets/js/474.e9c805de.js"><link rel="prefetch" href="/assets/js/475.93cab6cb.js"><link rel="prefetch" href="/assets/js/476.89384fa4.js"><link rel="prefetch" href="/assets/js/477.2b282ee8.js"><link rel="prefetch" href="/assets/js/478.27790491.js"><link rel="prefetch" href="/assets/js/479.2b728ba6.js"><link rel="prefetch" href="/assets/js/48.0e76d761.js"><link rel="prefetch" href="/assets/js/480.bd0beea9.js"><link rel="prefetch" href="/assets/js/481.004a0005.js"><link rel="prefetch" href="/assets/js/482.d9c6dc45.js"><link rel="prefetch" href="/assets/js/483.e7842361.js"><link rel="prefetch" href="/assets/js/484.702ac9a3.js"><link rel="prefetch" href="/assets/js/485.d38ba4c2.js"><link rel="prefetch" href="/assets/js/486.8a0cd211.js"><link rel="prefetch" href="/assets/js/487.18e243bb.js"><link rel="prefetch" href="/assets/js/488.cb0ad1bf.js"><link rel="prefetch" href="/assets/js/489.7c7adc5c.js"><link rel="prefetch" href="/assets/js/49.83e0619b.js"><link rel="prefetch" href="/assets/js/490.3f86a6a4.js"><link rel="prefetch" href="/assets/js/491.c1c90b4f.js"><link rel="prefetch" href="/assets/js/492.5658313d.js"><link rel="prefetch" href="/assets/js/493.9b953b18.js"><link rel="prefetch" href="/assets/js/494.80e3d4f4.js"><link rel="prefetch" href="/assets/js/495.66650a67.js"><link rel="prefetch" href="/assets/js/496.4e0d753b.js"><link rel="prefetch" href="/assets/js/497.1837b7c2.js"><link rel="prefetch" href="/assets/js/498.e2dcd450.js"><link rel="prefetch" href="/assets/js/499.4d5022f2.js"><link rel="prefetch" href="/assets/js/5.f343fd5d.js"><link rel="prefetch" href="/assets/js/50.6716fe91.js"><link rel="prefetch" href="/assets/js/500.10c0ee69.js"><link rel="prefetch" href="/assets/js/501.be3f9599.js"><link rel="prefetch" href="/assets/js/502.27844894.js"><link rel="prefetch" href="/assets/js/503.15f84a9b.js"><link rel="prefetch" href="/assets/js/504.60780a8e.js"><link rel="prefetch" href="/assets/js/505.6f9bed41.js"><link rel="prefetch" href="/assets/js/506.3e19b413.js"><link rel="prefetch" href="/assets/js/507.a12a02cb.js"><link rel="prefetch" href="/assets/js/508.b1384524.js"><link rel="prefetch" href="/assets/js/509.c74ef6c0.js"><link rel="prefetch" href="/assets/js/51.bc8d5aaf.js"><link rel="prefetch" href="/assets/js/510.266a6048.js"><link rel="prefetch" href="/assets/js/511.be98a2ef.js"><link rel="prefetch" href="/assets/js/512.e033e89e.js"><link rel="prefetch" href="/assets/js/513.837b9052.js"><link rel="prefetch" href="/assets/js/514.38271d19.js"><link rel="prefetch" href="/assets/js/515.c08327b5.js"><link rel="prefetch" href="/assets/js/516.3d573fdf.js"><link rel="prefetch" href="/assets/js/517.5406a8bd.js"><link rel="prefetch" href="/assets/js/518.543bea6f.js"><link rel="prefetch" href="/assets/js/519.e4967ce6.js"><link rel="prefetch" href="/assets/js/52.20603f07.js"><link rel="prefetch" href="/assets/js/520.0a863135.js"><link rel="prefetch" href="/assets/js/521.80c26149.js"><link rel="prefetch" href="/assets/js/522.5d0549ee.js"><link rel="prefetch" href="/assets/js/523.4b5d705c.js"><link rel="prefetch" href="/assets/js/524.24354cd8.js"><link rel="prefetch" href="/assets/js/525.d201b688.js"><link rel="prefetch" href="/assets/js/526.f405c35a.js"><link rel="prefetch" href="/assets/js/527.921d252f.js"><link rel="prefetch" href="/assets/js/528.cb45a5dd.js"><link rel="prefetch" href="/assets/js/529.aeec69e2.js"><link rel="prefetch" href="/assets/js/53.9604c447.js"><link rel="prefetch" href="/assets/js/530.7d5514c0.js"><link rel="prefetch" href="/assets/js/531.de381ab2.js"><link rel="prefetch" href="/assets/js/532.31b6e993.js"><link rel="prefetch" href="/assets/js/533.23335bff.js"><link rel="prefetch" href="/assets/js/534.131d260d.js"><link rel="prefetch" href="/assets/js/535.3057e7f2.js"><link rel="prefetch" href="/assets/js/536.1df4cc6e.js"><link rel="prefetch" href="/assets/js/537.c23a3391.js"><link rel="prefetch" href="/assets/js/538.ac3546d3.js"><link rel="prefetch" href="/assets/js/539.36137525.js"><link rel="prefetch" href="/assets/js/54.841e8e8f.js"><link rel="prefetch" href="/assets/js/540.f9171241.js"><link rel="prefetch" href="/assets/js/541.00a9732f.js"><link rel="prefetch" href="/assets/js/542.d981dcf7.js"><link rel="prefetch" href="/assets/js/543.0016cdef.js"><link rel="prefetch" href="/assets/js/544.b24fa17d.js"><link rel="prefetch" href="/assets/js/545.8adcd15c.js"><link rel="prefetch" href="/assets/js/546.189f10ef.js"><link rel="prefetch" href="/assets/js/547.d47175ac.js"><link rel="prefetch" href="/assets/js/548.67ed7a21.js"><link rel="prefetch" href="/assets/js/549.a72c957e.js"><link rel="prefetch" href="/assets/js/55.eccc64f8.js"><link rel="prefetch" href="/assets/js/550.c127415f.js"><link rel="prefetch" href="/assets/js/551.288648b2.js"><link rel="prefetch" href="/assets/js/552.5191109c.js"><link rel="prefetch" href="/assets/js/553.a0417c79.js"><link rel="prefetch" href="/assets/js/554.05224c83.js"><link rel="prefetch" href="/assets/js/555.d95f24bd.js"><link rel="prefetch" href="/assets/js/556.42a17364.js"><link rel="prefetch" href="/assets/js/557.a066d457.js"><link rel="prefetch" href="/assets/js/558.1f4641c3.js"><link rel="prefetch" href="/assets/js/559.f85fd85a.js"><link rel="prefetch" href="/assets/js/56.9ede6cf7.js"><link rel="prefetch" href="/assets/js/560.c486ead6.js"><link rel="prefetch" href="/assets/js/561.5654ef71.js"><link rel="prefetch" href="/assets/js/562.8ac06965.js"><link rel="prefetch" href="/assets/js/563.209407dd.js"><link rel="prefetch" href="/assets/js/564.4da5848b.js"><link rel="prefetch" href="/assets/js/565.0ea0c2cb.js"><link rel="prefetch" href="/assets/js/566.fbb62b05.js"><link rel="prefetch" href="/assets/js/567.0454bee2.js"><link rel="prefetch" href="/assets/js/568.5aad57f8.js"><link rel="prefetch" href="/assets/js/569.b4b199ad.js"><link rel="prefetch" href="/assets/js/57.2e9b38e9.js"><link rel="prefetch" href="/assets/js/570.890f1d05.js"><link rel="prefetch" href="/assets/js/571.56e5f721.js"><link rel="prefetch" href="/assets/js/572.fa3418f1.js"><link rel="prefetch" href="/assets/js/573.224ada77.js"><link rel="prefetch" href="/assets/js/574.4cc85330.js"><link rel="prefetch" href="/assets/js/575.61a17f5e.js"><link rel="prefetch" href="/assets/js/576.0ec5efb8.js"><link rel="prefetch" href="/assets/js/577.6bc915dd.js"><link rel="prefetch" href="/assets/js/578.fd4e39e7.js"><link rel="prefetch" href="/assets/js/579.0238c950.js"><link rel="prefetch" href="/assets/js/58.f28ad3cc.js"><link rel="prefetch" href="/assets/js/580.a08c6c02.js"><link rel="prefetch" href="/assets/js/581.392f9c6f.js"><link rel="prefetch" href="/assets/js/582.2f59e9f2.js"><link rel="prefetch" href="/assets/js/583.2097fe85.js"><link rel="prefetch" href="/assets/js/584.f0d8c622.js"><link rel="prefetch" href="/assets/js/585.85fab1f2.js"><link rel="prefetch" href="/assets/js/586.c359098c.js"><link rel="prefetch" href="/assets/js/587.1dff90c3.js"><link rel="prefetch" href="/assets/js/588.6afc16eb.js"><link rel="prefetch" href="/assets/js/589.4337cfee.js"><link rel="prefetch" href="/assets/js/59.9079a4f5.js"><link rel="prefetch" href="/assets/js/590.f969cc18.js"><link rel="prefetch" href="/assets/js/591.dfceaca2.js"><link rel="prefetch" href="/assets/js/592.b670f7b8.js"><link rel="prefetch" href="/assets/js/593.85ff3e7e.js"><link rel="prefetch" href="/assets/js/594.87d3c73b.js"><link rel="prefetch" href="/assets/js/595.18f2a1df.js"><link rel="prefetch" href="/assets/js/596.adb07b39.js"><link rel="prefetch" href="/assets/js/597.4bfdae44.js"><link rel="prefetch" href="/assets/js/598.a4f73bf5.js"><link rel="prefetch" href="/assets/js/599.5b85b7f2.js"><link rel="prefetch" href="/assets/js/6.6f5ae702.js"><link rel="prefetch" href="/assets/js/60.3095e21a.js"><link rel="prefetch" href="/assets/js/600.98cef029.js"><link rel="prefetch" href="/assets/js/601.34cfecd2.js"><link rel="prefetch" href="/assets/js/602.afaf2e1f.js"><link rel="prefetch" href="/assets/js/603.5f081041.js"><link rel="prefetch" href="/assets/js/604.a55dc3e4.js"><link rel="prefetch" href="/assets/js/605.cc600bca.js"><link rel="prefetch" href="/assets/js/606.9e0874e1.js"><link rel="prefetch" href="/assets/js/607.bd0a2835.js"><link rel="prefetch" href="/assets/js/608.e3c0bb6d.js"><link rel="prefetch" href="/assets/js/609.968adfbe.js"><link rel="prefetch" href="/assets/js/61.cd58c0e2.js"><link rel="prefetch" href="/assets/js/610.6ddb82e2.js"><link rel="prefetch" href="/assets/js/611.f6573e33.js"><link rel="prefetch" href="/assets/js/612.cd703232.js"><link rel="prefetch" href="/assets/js/613.5ae48097.js"><link rel="prefetch" href="/assets/js/614.c9fc5628.js"><link rel="prefetch" href="/assets/js/615.5f3c1162.js"><link rel="prefetch" href="/assets/js/616.3efeed17.js"><link rel="prefetch" href="/assets/js/617.25dec672.js"><link rel="prefetch" href="/assets/js/618.b53f21b6.js"><link rel="prefetch" href="/assets/js/619.e0c2de74.js"><link rel="prefetch" href="/assets/js/62.aa4d202d.js"><link rel="prefetch" href="/assets/js/620.88136c6a.js"><link rel="prefetch" href="/assets/js/621.494122df.js"><link rel="prefetch" href="/assets/js/622.e2a6e4bd.js"><link rel="prefetch" href="/assets/js/623.20a56d61.js"><link rel="prefetch" href="/assets/js/624.602dd933.js"><link rel="prefetch" href="/assets/js/625.70f44f60.js"><link rel="prefetch" href="/assets/js/626.11524978.js"><link rel="prefetch" href="/assets/js/627.b3badb72.js"><link rel="prefetch" href="/assets/js/628.e613665e.js"><link rel="prefetch" href="/assets/js/629.20e73b43.js"><link rel="prefetch" href="/assets/js/63.f7cd40f4.js"><link rel="prefetch" href="/assets/js/630.6099312f.js"><link rel="prefetch" href="/assets/js/631.669bcda0.js"><link rel="prefetch" href="/assets/js/632.d33f5ec9.js"><link rel="prefetch" href="/assets/js/633.211456ee.js"><link rel="prefetch" href="/assets/js/634.ea9d07ae.js"><link rel="prefetch" href="/assets/js/635.f22368f1.js"><link rel="prefetch" href="/assets/js/636.ebe249f7.js"><link rel="prefetch" href="/assets/js/637.7b645ab3.js"><link rel="prefetch" href="/assets/js/638.4565c395.js"><link rel="prefetch" href="/assets/js/639.c5144f9c.js"><link rel="prefetch" href="/assets/js/64.8cd3aa43.js"><link rel="prefetch" href="/assets/js/640.2dc2eba9.js"><link rel="prefetch" href="/assets/js/641.70155ce7.js"><link rel="prefetch" href="/assets/js/642.c55f5ca8.js"><link rel="prefetch" href="/assets/js/643.69a5b8e5.js"><link rel="prefetch" href="/assets/js/644.84431935.js"><link rel="prefetch" href="/assets/js/645.5119ebc2.js"><link rel="prefetch" href="/assets/js/646.506fc745.js"><link rel="prefetch" href="/assets/js/647.e5f03652.js"><link rel="prefetch" href="/assets/js/648.47ae0cc5.js"><link rel="prefetch" href="/assets/js/649.b3a67529.js"><link rel="prefetch" href="/assets/js/65.14b3da5d.js"><link rel="prefetch" href="/assets/js/650.89765bb0.js"><link rel="prefetch" href="/assets/js/651.19b73cf8.js"><link rel="prefetch" href="/assets/js/652.4436725f.js"><link rel="prefetch" href="/assets/js/653.391168ff.js"><link rel="prefetch" href="/assets/js/654.8b449d07.js"><link rel="prefetch" href="/assets/js/655.27051c8c.js"><link rel="prefetch" href="/assets/js/656.7adaae31.js"><link rel="prefetch" href="/assets/js/657.4fee46d2.js"><link rel="prefetch" href="/assets/js/658.0243a6e8.js"><link rel="prefetch" href="/assets/js/659.f69398bc.js"><link rel="prefetch" href="/assets/js/66.899fc260.js"><link rel="prefetch" href="/assets/js/660.5e51ab7c.js"><link rel="prefetch" href="/assets/js/661.980d3d5a.js"><link rel="prefetch" href="/assets/js/662.79643730.js"><link rel="prefetch" href="/assets/js/663.d030bd1d.js"><link rel="prefetch" href="/assets/js/664.32b3c0e8.js"><link rel="prefetch" href="/assets/js/665.384c456b.js"><link rel="prefetch" href="/assets/js/666.2672eb36.js"><link rel="prefetch" href="/assets/js/667.2ca85ff9.js"><link rel="prefetch" href="/assets/js/668.b80ef3b4.js"><link rel="prefetch" href="/assets/js/669.41f08cb1.js"><link rel="prefetch" href="/assets/js/67.c0e799e4.js"><link rel="prefetch" href="/assets/js/670.48512f45.js"><link rel="prefetch" href="/assets/js/671.93e1cdd9.js"><link rel="prefetch" href="/assets/js/672.aa2a7e31.js"><link rel="prefetch" href="/assets/js/673.b19ed80d.js"><link rel="prefetch" href="/assets/js/674.0337bf32.js"><link rel="prefetch" href="/assets/js/675.88a9d569.js"><link rel="prefetch" href="/assets/js/676.7fd2de1c.js"><link rel="prefetch" href="/assets/js/677.1356b477.js"><link rel="prefetch" href="/assets/js/678.d99fd658.js"><link rel="prefetch" href="/assets/js/679.a2e40bc7.js"><link rel="prefetch" href="/assets/js/68.2e72dacb.js"><link rel="prefetch" href="/assets/js/680.58e5d76e.js"><link rel="prefetch" href="/assets/js/681.2e66d773.js"><link rel="prefetch" href="/assets/js/682.42526013.js"><link rel="prefetch" href="/assets/js/683.447d4972.js"><link rel="prefetch" href="/assets/js/684.19beb22a.js"><link rel="prefetch" href="/assets/js/685.cd3fd615.js"><link rel="prefetch" href="/assets/js/686.c6200f3f.js"><link rel="prefetch" href="/assets/js/687.3d6cf8bb.js"><link rel="prefetch" href="/assets/js/688.e9ddd041.js"><link rel="prefetch" href="/assets/js/689.74bb6414.js"><link rel="prefetch" href="/assets/js/69.d29a7787.js"><link rel="prefetch" href="/assets/js/690.82b51acd.js"><link rel="prefetch" href="/assets/js/691.a6edc5c3.js"><link rel="prefetch" href="/assets/js/692.c5fd2fa7.js"><link rel="prefetch" href="/assets/js/693.0c0b8126.js"><link rel="prefetch" href="/assets/js/694.551ae4d1.js"><link rel="prefetch" href="/assets/js/695.2801a2f2.js"><link rel="prefetch" href="/assets/js/696.8723006b.js"><link rel="prefetch" href="/assets/js/697.275e71c7.js"><link rel="prefetch" href="/assets/js/698.431e2bfb.js"><link rel="prefetch" href="/assets/js/699.c82907d3.js"><link rel="prefetch" href="/assets/js/7.c8b0ee6b.js"><link rel="prefetch" href="/assets/js/70.53b18677.js"><link rel="prefetch" href="/assets/js/700.9faf8917.js"><link rel="prefetch" href="/assets/js/701.5ce77f04.js"><link rel="prefetch" href="/assets/js/702.488262eb.js"><link rel="prefetch" href="/assets/js/703.8f79363d.js"><link rel="prefetch" href="/assets/js/704.a4cfe8cb.js"><link rel="prefetch" href="/assets/js/705.4f1759eb.js"><link rel="prefetch" href="/assets/js/706.baf03b10.js"><link rel="prefetch" href="/assets/js/707.48c01840.js"><link rel="prefetch" href="/assets/js/708.b3cda177.js"><link rel="prefetch" href="/assets/js/709.260cc3a8.js"><link rel="prefetch" href="/assets/js/71.b44506bc.js"><link rel="prefetch" href="/assets/js/710.e4fa6646.js"><link rel="prefetch" href="/assets/js/711.7816aba5.js"><link rel="prefetch" href="/assets/js/712.14939ffd.js"><link rel="prefetch" href="/assets/js/72.9793c1ce.js"><link rel="prefetch" href="/assets/js/73.b4d37c7e.js"><link rel="prefetch" href="/assets/js/74.b816cbc7.js"><link rel="prefetch" href="/assets/js/75.9f45a274.js"><link rel="prefetch" href="/assets/js/76.4921e235.js"><link rel="prefetch" href="/assets/js/77.f9258c97.js"><link rel="prefetch" href="/assets/js/78.55656c0f.js"><link rel="prefetch" href="/assets/js/79.b5784c72.js"><link rel="prefetch" href="/assets/js/8.44118d7c.js"><link rel="prefetch" href="/assets/js/80.98240933.js"><link rel="prefetch" href="/assets/js/81.5421fa90.js"><link rel="prefetch" href="/assets/js/82.72a10ccf.js"><link rel="prefetch" href="/assets/js/83.abdca93e.js"><link rel="prefetch" href="/assets/js/84.5d0190e3.js"><link rel="prefetch" href="/assets/js/85.5d2a1647.js"><link rel="prefetch" href="/assets/js/86.5aea5730.js"><link rel="prefetch" href="/assets/js/87.bfe2bb57.js"><link rel="prefetch" href="/assets/js/88.4097611c.js"><link rel="prefetch" href="/assets/js/89.e5a98da0.js"><link rel="prefetch" href="/assets/js/9.612b54fd.js"><link rel="prefetch" href="/assets/js/90.5564a69b.js"><link rel="prefetch" href="/assets/js/91.ff219511.js"><link rel="prefetch" href="/assets/js/92.8191f073.js"><link rel="prefetch" href="/assets/js/93.4b6ecb16.js"><link rel="prefetch" href="/assets/js/94.fd999a73.js"><link rel="prefetch" href="/assets/js/95.c96c310d.js"><link rel="prefetch" href="/assets/js/96.2eb0ab2f.js"><link rel="prefetch" href="/assets/js/97.4c8c6fba.js"><link rel="prefetch" href="/assets/js/98.f9ef7bdb.js"><link rel="prefetch" href="/assets/js/99.513483d0.js"><link rel="prefetch" href="/assets/js/vendors~docsearch.49ad9c45.js">
    <link rel="stylesheet" href="/assets/css/0.styles.af3770e9.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/en/" class="home-link router-link-active"><img src="/images/icons/spring-logo.svg" alt="Spring Docs" class="logo"> <span class="site-name can-hide">Spring Docs</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/en/spring/why-spring.html" class="nav-link">
  Spring
</a></div><div class="nav-item"><a href="/en/spring-boot/getting-help.html" class="nav-link">
  Spring Boot
</a></div><div class="nav-item"><a href="/en/spring-cloud/documentation-overview.html" class="nav-link">
  Spring Cloud
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Others" class="dropdown-title"><span class="title">more</span> <span class="arrow down"></span></button> <button type="button" aria-label="Others" class="mobile-dropdown-title"><span class="title">more</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/en/spring-framework/overview.html" class="nav-link">
  Spring Framework
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-data/spring-data.html" class="nav-link">
  Spring Data
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-cloud-data-flow/spring-cloud-dataflow.html" class="nav-link">
  Spring Cloud Data Flow
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-security/overview.html" class="nav-link">
  Spring Security
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-for-graphql/spring-graphql.html" class="nav-link">
  Spring for GraphQL
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-session/_index.html" class="nav-link">
  Spring Session
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-integration/preface.html" class="nav-link">
  Spring Integration
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-hateoas/spring-hateoas.html" class="nav-link">
  Spring HATEOAS
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-rest-docs/spring-restdocs.html" class="nav-link">
  Spring REST Docs
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-batch/spring-batch-intro.html" class="nav-link">
  Spring Batch
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-amqp/spring-amqp.html" class="nav-link">
  Spring AMQP
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-credhub/spring-credhub.html" class="nav-link">
  Spring CredHub
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-flo/spring-flo.html" class="nav-link">
  Spring Flo
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-for-apache-kafka/spring-kafka.html" class="nav-link">
  Spring for Apache Kafka
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-ldap/spring-ldap.html" class="nav-link">
  Spring LDAP
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-shell/spring-shell.html" class="nav-link">
  Spring Shell
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-statemachine/spring-statemachine.html" class="nav-link">
  Spring Statemachine
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-vault/spring-vault.html" class="nav-link">
  Spring Vault
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-web-flow/preface.html" class="nav-link">
  Spring Web Flow
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-web-services/spring-web-service.html" class="nav-link">
  Spring Web Services
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Select language" class="dropdown-title"><span class="title">Language</span> <span class="arrow down"></span></button> <button type="button" aria-label="Select language" class="mobile-dropdown-title"><span class="title">Language</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/en/spring-boot/actuator.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  English
</a></li><li class="dropdown-item"><!----> <a href="/spring-boot/actuator.html" class="nav-link">
  简体中文
</a></li></ul></div></div> <a href="https://gitcode.net/dev-cloud/spring-docs" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitCode
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/en/spring/why-spring.html" class="nav-link">
  Spring
</a></div><div class="nav-item"><a href="/en/spring-boot/getting-help.html" class="nav-link">
  Spring Boot
</a></div><div class="nav-item"><a href="/en/spring-cloud/documentation-overview.html" class="nav-link">
  Spring Cloud
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Others" class="dropdown-title"><span class="title">more</span> <span class="arrow down"></span></button> <button type="button" aria-label="Others" class="mobile-dropdown-title"><span class="title">more</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/en/spring-framework/overview.html" class="nav-link">
  Spring Framework
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-data/spring-data.html" class="nav-link">
  Spring Data
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-cloud-data-flow/spring-cloud-dataflow.html" class="nav-link">
  Spring Cloud Data Flow
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-security/overview.html" class="nav-link">
  Spring Security
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-for-graphql/spring-graphql.html" class="nav-link">
  Spring for GraphQL
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-session/_index.html" class="nav-link">
  Spring Session
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-integration/preface.html" class="nav-link">
  Spring Integration
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-hateoas/spring-hateoas.html" class="nav-link">
  Spring HATEOAS
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-rest-docs/spring-restdocs.html" class="nav-link">
  Spring REST Docs
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-batch/spring-batch-intro.html" class="nav-link">
  Spring Batch
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-amqp/spring-amqp.html" class="nav-link">
  Spring AMQP
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-credhub/spring-credhub.html" class="nav-link">
  Spring CredHub
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-flo/spring-flo.html" class="nav-link">
  Spring Flo
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-for-apache-kafka/spring-kafka.html" class="nav-link">
  Spring for Apache Kafka
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-ldap/spring-ldap.html" class="nav-link">
  Spring LDAP
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-shell/spring-shell.html" class="nav-link">
  Spring Shell
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-statemachine/spring-statemachine.html" class="nav-link">
  Spring Statemachine
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-vault/spring-vault.html" class="nav-link">
  Spring Vault
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-web-flow/preface.html" class="nav-link">
  Spring Web Flow
</a></li><li class="dropdown-item"><!----> <a href="/en/spring-web-services/spring-web-service.html" class="nav-link">
  Spring Web Services
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Select language" class="dropdown-title"><span class="title">Language</span> <span class="arrow down"></span></button> <button type="button" aria-label="Select language" class="mobile-dropdown-title"><span class="title">Language</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/en/spring-boot/actuator.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  English
</a></li><li class="dropdown-item"><!----> <a href="/spring-boot/actuator.html" class="nav-link">
  简体中文
</a></li></ul></div></div> <a href="https://gitcode.net/dev-cloud/spring-docs" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitCode
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Spring Boot</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/en/spring-boot/getting-help.html" class="sidebar-link">Getting Help</a></li><li><a href="/en/spring-boot/documentation.html" class="sidebar-link">Documentation Overview</a></li><li><a href="/en/spring-boot/getting-started.html" class="sidebar-link">Getting Started</a></li><li><a href="/en/spring-boot/upgrading.html" class="sidebar-link">Upgrading Spring Boot</a></li><li><a href="/en/spring-boot/using.html" class="sidebar-link">Developing with Spring Boot</a></li><li><a href="/en/spring-boot/features.html" class="sidebar-link">Core Features</a></li><li><a href="/en/spring-boot/web.html" class="sidebar-link">Web</a></li><li><a href="/en/spring-boot/data.html" class="sidebar-link">Data</a></li><li><a href="/en/spring-boot/io.html" class="sidebar-link">IO</a></li><li><a href="/en/spring-boot/messaging.html" class="sidebar-link">Messaging</a></li><li><a href="/en/spring-boot/container-images.html" class="sidebar-link">Container Images</a></li><li><a href="/en/spring-boot/actuator.html" aria-current="page" class="active sidebar-link">Production-ready Features</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_1-enabling-production-ready-features" class="sidebar-link">1. Enabling Production-ready Features</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-endpoints" class="sidebar-link">2. Endpoints</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-1-enabling-endpoints" class="sidebar-link">2.1. Enabling Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-2-exposing-endpoints" class="sidebar-link">2.2. Exposing Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-3-security" class="sidebar-link">2.3. Security</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-4-configuring-endpoints" class="sidebar-link">2.4. Configuring Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-5-hypermedia-for-actuator-web-endpoints" class="sidebar-link">2.5. Hypermedia for Actuator Web Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-6-cors-support" class="sidebar-link">2.6. CORS Support</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-7-implementing-custom-endpoints" class="sidebar-link">2.7. Implementing Custom Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-8-health-information" class="sidebar-link">2.8. Health Information</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-9-kubernetes-probes" class="sidebar-link">2.9. Kubernetes Probes</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_2-10-application-information" class="sidebar-link">2.10. Application Information</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-monitoring-and-management-over-http" class="sidebar-link">3. Monitoring and Management over HTTP</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-1-customizing-the-management-endpoint-paths" class="sidebar-link">3.1. Customizing the Management Endpoint Paths</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-2-customizing-the-management-server-port" class="sidebar-link">3.2. Customizing the Management Server Port</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-3-configuring-management-specific-ssl" class="sidebar-link">3.3. Configuring Management-specific SSL</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-4-customizing-the-management-server-address" class="sidebar-link">3.4. Customizing the Management Server Address</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_3-5-disabling-http-endpoints" class="sidebar-link">3.5. Disabling HTTP Endpoints</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_4-monitoring-and-management-over-jmx" class="sidebar-link">4. Monitoring and Management over JMX</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_4-1-customizing-mbean-names" class="sidebar-link">4.1. Customizing MBean Names</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_4-2-disabling-jmx-endpoints" class="sidebar-link">4.2. Disabling JMX Endpoints</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_4-3-using-jolokia-for-jmx-over-http" class="sidebar-link">4.3. Using Jolokia for JMX over HTTP</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_5-loggers" class="sidebar-link">5. Loggers</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_5-1-configure-a-logger" class="sidebar-link">5.1. Configure a Logger</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-metrics" class="sidebar-link">6. Metrics</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-1-getting-started" class="sidebar-link">6.1. Getting started</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-2-supported-monitoring-systems" class="sidebar-link">6.2. Supported Monitoring Systems</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-3-supported-metrics-and-meters" class="sidebar-link">6.3. Supported Metrics and Meters</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-4-registering-custom-metrics" class="sidebar-link">6.4. Registering Custom Metrics</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-5-customizing-individual-metrics" class="sidebar-link">6.5. Customizing Individual Metrics</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_6-6-metrics-endpoint" class="sidebar-link">6.6. Metrics Endpoint</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_7-auditing" class="sidebar-link">7. Auditing</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_7-1-custom-auditing" class="sidebar-link">7.1. Custom Auditing</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_8-http-tracing" class="sidebar-link">8. HTTP Tracing</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_8-1-custom-http-tracing" class="sidebar-link">8.1. Custom HTTP tracing</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_9-process-monitoring" class="sidebar-link">9. Process Monitoring</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_9-1-extending-configuration" class="sidebar-link">9.1. Extending Configuration</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_9-2-programmatically-enabling-process-monitoring" class="sidebar-link">9.2. Programmatically Enabling Process Monitoring</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_10-cloud-foundry-support" class="sidebar-link">10. Cloud Foundry Support</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_10-1-disabling-extended-cloud-foundry-actuator-support" class="sidebar-link">10.1. Disabling Extended Cloud Foundry Actuator Support</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_10-2-cloud-foundry-self-signed-certificates" class="sidebar-link">10.2. Cloud Foundry Self-signed Certificates</a></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_10-3-custom-context-path" class="sidebar-link">10.3. Custom Context Path</a></li></ul></li><li class="sidebar-sub-header"><a href="/en/spring-boot/actuator.html#_11-what-to-read-next" class="sidebar-link">11. What to Read Next</a></li></ul></li><li><a href="/en/spring-boot/deployment.html" class="sidebar-link">Deploying Spring Boot Applications</a></li><li><a href="/en/spring-boot/cli.html" class="sidebar-link">Spring Boot CLI</a></li><li><a href="/en/spring-boot/build-tool-plugins.html" class="sidebar-link">Build Tool Plugins</a></li><li><a href="/en/spring-boot/howto.html" class="sidebar-link">“How-to” Guides</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="production-ready-features"><a href="#production-ready-features" class="header-anchor">#</a> Production-ready Features</h1> <p>Spring Boot includes a number of additional features to help you monitor and manage your application when you push it to production.
You can choose to manage and monitor your application by using HTTP endpoints or with JMX.
Auditing, health, and metrics gathering can also be automatically applied to your application.</p> <h2 id="_1-enabling-production-ready-features"><a href="#_1-enabling-production-ready-features" class="header-anchor">#</a> 1. Enabling Production-ready Features</h2> <p>The <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator" target="_blank" rel="noopener noreferrer"><code>spring-boot-actuator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> module provides all of Spring Boot’s production-ready features.
The recommended way to enable the features is to add a dependency on the <code>spring-boot-starter-actuator</code> “Starter”.</p> <p>Definition of Actuator</p> <p>An actuator is a manufacturing term that refers to a mechanical device for moving or controlling something.
Actuators can generate a large amount of motion from a small change.</p> <p>To add the actuator to a Maven-based project, add the following ‘Starter’ dependency:</p> <div class="language- extra-class"><pre class="language-text"><code>&lt;dependencies&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
    &lt;/dependency&gt;
&lt;/dependencies&gt;
</code></pre></div><p>For Gradle, use the following declaration:</p> <div class="language- extra-class"><pre class="language-text"><code>dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
}
</code></pre></div><h2 id="_2-endpoints"><a href="#_2-endpoints" class="header-anchor">#</a> 2. Endpoints</h2> <p>Actuator endpoints let you monitor and interact with your application.
Spring Boot includes a number of built-in endpoints and lets you add your own.
For example, the <code>health</code> endpoint provides basic application health information.</p> <p>You can <a href="#actuator.endpoints.enabling">enable or disable</a> each individual endpoint and <a href="#actuator.endpoints.exposing">expose them (make them remotely accessible) over HTTP or JMX</a>.
An endpoint is considered to be available when it is both enabled and exposed.
The built-in endpoints are auto-configured only when they are available.
Most applications choose exposure over HTTP, where the ID of the endpoint and a prefix of <code>/actuator</code> is mapped to a URL.
For example, by default, the <code>health</code> endpoint is mapped to <code>/actuator/health</code>.</p> <table><thead><tr><th></th> <th>To learn more about the Actuator’s endpoints and their request and response formats, see the separate API documentation (<a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/htmlsingle" target="_blank" rel="noopener noreferrer">HTML<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> or <a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/pdf/spring-boot-actuator-web-api.pdf" target="_blank" rel="noopener noreferrer">PDF<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>).</th></tr></thead> <tbody></tbody></table> <p>The following technology-agnostic endpoints are available:</p> <table><thead><tr><th>ID</th> <th>Description</th></tr></thead> <tbody><tr><td><code>auditevents</code></td> <td>Exposes audit events information for the current application.<br>Requires an <code>AuditEventRepository</code> bean.</td></tr> <tr><td><code>beans</code></td> <td>Displays a complete list of all the Spring beans in your application.</td></tr> <tr><td><code>caches</code></td> <td>Exposes available caches.</td></tr> <tr><td><code>conditions</code></td> <td>Shows the conditions that were evaluated on configuration and auto-configuration classes and the reasons why they did or did not match.</td></tr> <tr><td><code>configprops</code></td> <td>Displays a collated list of all <code>@ConfigurationProperties</code>.</td></tr> <tr><td><code>env</code></td> <td>Exposes properties from Spring’s <code>ConfigurableEnvironment</code>.</td></tr> <tr><td><code>flyway</code></td> <td>Shows any Flyway database migrations that have been applied.<br>Requires one or more <code>Flyway</code> beans.</td></tr> <tr><td><code>health</code></td> <td>Shows application health information.</td></tr> <tr><td><code>httptrace</code></td> <td>Displays HTTP trace information (by default, the last 100 HTTP request-response exchanges).<br>Requires an <code>HttpTraceRepository</code> bean.</td></tr> <tr><td><code>info</code></td> <td>Displays arbitrary application info.</td></tr> <tr><td><code>integrationgraph</code></td> <td>Shows the Spring Integration graph.<br>Requires a dependency on <code>spring-integration-core</code>.</td></tr> <tr><td><code>loggers</code></td> <td>Shows and modifies the configuration of loggers in the application.</td></tr> <tr><td><code>liquibase</code></td> <td>Shows any Liquibase database migrations that have been applied.<br>Requires one or more <code>Liquibase</code> beans.</td></tr> <tr><td><code>metrics</code></td> <td>Shows “metrics” information for the current application.</td></tr> <tr><td><code>mappings</code></td> <td>Displays a collated list of all <code>@RequestMapping</code> paths.</td></tr> <tr><td><code>quartz</code></td> <td>Shows information about Quartz Scheduler jobs.</td></tr> <tr><td><code>scheduledtasks</code></td> <td>Displays the scheduled tasks in your application.</td></tr> <tr><td><code>sessions</code></td> <td>Allows retrieval and deletion of user sessions from a Spring Session-backed session store.<br>Requires a servlet-based web application that uses Spring Session.</td></tr> <tr><td><code>shutdown</code></td> <td>Lets the application be gracefully shutdown.<br>Disabled by default.</td></tr> <tr><td><code>startup</code></td> <td>Shows the <a href="/en/spring-boot/features.html#features.spring-application.startup-tracking">startup steps data</a> collected by the <code>ApplicationStartup</code>.<br>Requires the <code>SpringApplication</code> to be configured with a <code>BufferingApplicationStartup</code>.</td></tr> <tr><td><code>threaddump</code></td> <td>Performs a thread dump.</td></tr></tbody></table> <p>If your application is a web application (Spring MVC, Spring WebFlux, or Jersey), you can use the following additional endpoints:</p> <table><thead><tr><th>ID</th> <th>Description</th></tr></thead> <tbody><tr><td><code>heapdump</code></td> <td>Returns a heap dump file.<br>On a HotSpot JVM, an <code>HPROF</code>-format file is returned.<br>On an OpenJ9 JVM, a <code>PHD</code>-format file is returned.</td></tr> <tr><td><code>jolokia</code></td> <td>Exposes JMX beans over HTTP when Jolokia is on the classpath (not available for WebFlux).<br>Requires a dependency on <code>jolokia-core</code>.</td></tr> <tr><td><code>logfile</code></td> <td>Returns the contents of the logfile (if the <code>logging.file.name</code> or the <code>logging.file.path</code> property has been set).<br>Supports the use of the HTTP <code>Range</code> header to retrieve part of the log file’s content.</td></tr> <tr><td><code>prometheus</code></td> <td>Exposes metrics in a format that can be scraped by a Prometheus server.<br>Requires a dependency on <code>micrometer-registry-prometheus</code>.</td></tr></tbody></table> <h3 id="_2-1-enabling-endpoints"><a href="#_2-1-enabling-endpoints" class="header-anchor">#</a> 2.1. Enabling Endpoints</h3> <p>By default, all endpoints except for <code>shutdown</code> are enabled.
To configure the enablement of an endpoint, use its <code>management.endpoint.&lt;id&gt;.enabled</code> property.
The following example enables the <code>shutdown</code> endpoint:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.shutdown.enabled=true
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    shutdown:
      enabled: true
</code></pre></div><p>If you prefer endpoint enablement to be opt-in rather than opt-out, set the <code>management.endpoints.enabled-by-default</code> property to <code>false</code> and use individual endpoint <code>enabled</code> properties to opt back in.
The following example enables the <code>info</code> endpoint and disables all other endpoints:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.enabled-by-default=false
management.endpoint.info.enabled=true
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    enabled-by-default: false
  endpoint:
    info:
      enabled: true
</code></pre></div><table><thead><tr><th></th> <th>Disabled endpoints are removed entirely from the application context.<br>If you want to change only the technologies over which an endpoint is exposed, use the <a href="#actuator.endpoints.exposing"><code>include</code> and <code>exclude</code> properties</a> instead.</th></tr></thead> <tbody></tbody></table> <h3 id="_2-2-exposing-endpoints"><a href="#_2-2-exposing-endpoints" class="header-anchor">#</a> 2.2. Exposing Endpoints</h3> <p>Since Endpoints may contain sensitive information, you should carefully consider when to expose them.
The following table shows the default exposure for the built-in endpoints:</p> <table><thead><tr><th>ID</th> <th>JMX</th> <th>Web</th></tr></thead> <tbody><tr><td><code>auditevents</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>beans</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>caches</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>conditions</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>configprops</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>env</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>flyway</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>health</code></td> <td>Yes</td> <td>Yes</td></tr> <tr><td><code>heapdump</code></td> <td>N/A</td> <td>No</td></tr> <tr><td><code>httptrace</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>info</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>integrationgraph</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>jolokia</code></td> <td>N/A</td> <td>No</td></tr> <tr><td><code>logfile</code></td> <td>N/A</td> <td>No</td></tr> <tr><td><code>loggers</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>liquibase</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>metrics</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>mappings</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>prometheus</code></td> <td>N/A</td> <td>No</td></tr> <tr><td><code>quartz</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>scheduledtasks</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>sessions</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>shutdown</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>startup</code></td> <td>Yes</td> <td>No</td></tr> <tr><td><code>threaddump</code></td> <td>Yes</td> <td>No</td></tr></tbody></table> <p>To change which endpoints are exposed, use the following technology-specific <code>include</code> and <code>exclude</code> properties:</p> <table><thead><tr><th>Property</th> <th>Default</th></tr></thead> <tbody><tr><td><code>management.endpoints.jmx.exposure.exclude</code></td> <td></td></tr> <tr><td><code>management.endpoints.jmx.exposure.include</code></td> <td><code>*</code></td></tr> <tr><td><code>management.endpoints.web.exposure.exclude</code></td> <td></td></tr> <tr><td><code>management.endpoints.web.exposure.include</code></td> <td><code>health</code></td></tr></tbody></table> <p>The <code>include</code> property lists the IDs of the endpoints that are exposed.
The <code>exclude</code> property lists the IDs of the endpoints that should not be exposed.
The <code>exclude</code> property takes precedence over the <code>include</code> property.
You can configure both the <code>include</code> and the <code>exclude</code> properties with a list of endpoint IDs.</p> <p>For example, to stop exposing all endpoints over JMX and only expose the <code>health</code> and <code>info</code> endpoints, use the following property:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.jmx.exposure.include=health,info
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    jmx:
      exposure:
        include: &quot;health,info&quot;
</code></pre></div><p><code>*</code> can be used to select all endpoints.
For example, to expose everything over HTTP except the <code>env</code> and <code>beans</code> endpoints, use the following properties:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.exposure.include=*
management.endpoints.web.exposure.exclude=env,beans
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      exposure:
        include: &quot;*&quot;
        exclude: &quot;env,beans&quot;
</code></pre></div><table><thead><tr><th></th> <th><code>*</code> has a special meaning in YAML, so be sure to add quotation marks if you want to include (or exclude) all endpoints.</th></tr></thead> <tbody></tbody></table> <table><thead><tr><th></th> <th>If your application is exposed publicly, we strongly recommend that you also <a href="#actuator.endpoints.security">secure your endpoints</a>.</th></tr></thead> <tbody></tbody></table> <table><thead><tr><th></th> <th>If you want to implement your own strategy for when endpoints are exposed, you can register an <code>EndpointFilter</code> bean.</th></tr></thead> <tbody></tbody></table> <h3 id="_2-3-security"><a href="#_2-3-security" class="header-anchor">#</a> 2.3. Security</h3> <p>For security purposes, all actuators other than <code>/health</code> are disabled by default.
You can use the <code>management.endpoints.web.exposure.include</code> property to enable the actuators.</p> <table><thead><tr><th></th> <th>Before setting the <code>management.endpoints.web.exposure.include</code>, ensure that the exposed actuators do not contain sensitive information, are secured by placing them behind a firewall, or are secured by something like Spring Security.</th></tr></thead> <tbody></tbody></table> <p>If Spring Security is on the classpath and no other <code>WebSecurityConfigurerAdapter</code> or <code>SecurityFilterChain</code> bean is present, all actuators other than <code>/health</code> are secured by Spring Boot auto-configuration.
If you define a custom <code>WebSecurityConfigurerAdapter</code> or <code>SecurityFilterChain</code> bean, Spring Boot auto-configuration backs off and lets you fully control the actuator access rules.</p> <p>If you wish to configure custom security for HTTP endpoints (for example, to allow only users with a certain role to access them), Spring Boot provides some convenient <code>RequestMatcher</code> objects that you can use in combination with Spring Security.</p> <p>A typical Spring Security configuration might look something like the following example:</p> <div class="language- extra-class"><pre class="language-text"><code>import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration(proxyBeanMethods = false)
public class MySecurityConfiguration {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http.requestMatcher(EndpointRequest.toAnyEndpoint())
                .authorizeRequests((requests) -&gt; requests.anyRequest().hasRole(&quot;ENDPOINT_ADMIN&quot;));
        http.httpBasic();
        return http.build();
    }

}

</code></pre></div><p>The preceding example uses <code>EndpointRequest.toAnyEndpoint()</code> to match a request to any endpoint and then ensures that all have the <code>ENDPOINT_ADMIN</code> role.
Several other matcher methods are also available on <code>EndpointRequest</code>.
See the API documentation (<a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/htmlsingle" target="_blank" rel="noopener noreferrer">HTML<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> or <a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/pdf/spring-boot-actuator-web-api.pdf" target="_blank" rel="noopener noreferrer">PDF<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>) for details.</p> <p>If you deploy applications behind a firewall, you may prefer that all your actuator endpoints can be accessed without requiring authentication.
You can do so by changing the <code>management.endpoints.web.exposure.include</code> property, as follows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.exposure.include=*
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      exposure:
        include: &quot;*&quot;
</code></pre></div><p>Additionally, if Spring Security is present, you would need to add custom security configuration that allows unauthenticated access to the endpoints, as the following example shows:</p> <div class="language- extra-class"><pre class="language-text"><code>import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.SecurityFilterChain;

@Configuration(proxyBeanMethods = false)
public class MySecurityConfiguration {

    @Bean
    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
        http.requestMatcher(EndpointRequest.toAnyEndpoint())
                .authorizeRequests((requests) -&gt; requests.anyRequest().permitAll());
        return http.build();
    }

}

</code></pre></div><table><thead><tr><th></th> <th>In both of the preceding examples, the configuration applies only to the actuator endpoints.<br>Since Spring Boot’s security configuration backs off completely in the presence of any <code>SecurityFilterChain</code> bean, you need to configure an additional <code>SecurityFilterChain</code> bean with rules that apply to the rest of the application.</th></tr></thead> <tbody></tbody></table> <h4 id="_2-3-1-cross-site-request-forgery-protection"><a href="#_2-3-1-cross-site-request-forgery-protection" class="header-anchor">#</a> 2.3.1. Cross Site Request Forgery Protection</h4> <p>Since Spring Boot relies on Spring Security’s defaults, CSRF protection is turned on by default.
This means that the actuator endpoints that require a <code>POST</code> (shutdown and loggers endpoints), a <code>PUT</code>, or a <code>DELETE</code> get a 403 (forbidden) error when the default security configuration is in use.</p> <table><thead><tr><th></th> <th>We recommend disabling CSRF protection completely only if you are creating a service that is used by non-browser clients.</th></tr></thead> <tbody></tbody></table> <p>You can find additional information about CSRF protection in the <a href="https://docs.spring.io/spring-security/reference/5.6.2/features/exploits/csrf.html" target="_blank" rel="noopener noreferrer">Spring Security Reference Guide<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <h3 id="_2-4-configuring-endpoints"><a href="#_2-4-configuring-endpoints" class="header-anchor">#</a> 2.4. Configuring Endpoints</h3> <p>Endpoints automatically cache responses to read operations that do not take any parameters.
To configure the amount of time for which an endpoint caches a response, use its <code>cache.time-to-live</code> property.
The following example sets the time-to-live of the <code>beans</code> endpoint’s cache to 10 seconds:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.beans.cache.time-to-live=10s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    beans:
      cache:
        time-to-live: &quot;10s&quot;
</code></pre></div><table><thead><tr><th></th> <th>The <code>management.endpoint.&lt;name&gt;</code> prefix uniquely identifies the endpoint that is being configured.</th></tr></thead> <tbody></tbody></table> <h3 id="_2-5-hypermedia-for-actuator-web-endpoints"><a href="#_2-5-hypermedia-for-actuator-web-endpoints" class="header-anchor">#</a> 2.5. Hypermedia for Actuator Web Endpoints</h3> <p>A “discovery page” is added with links to all the endpoints.
The “discovery page” is available on <code>/actuator</code> by default.</p> <p>To disable the “discovery page”, add the following property to your application properties:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.discovery.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      discovery:
        enabled: false
</code></pre></div><p>When a custom management context path is configured, the “discovery page” automatically moves from <code>/actuator</code> to the root of the management context.
For example, if the management context path is <code>/management</code>, the discovery page is available from <code>/management</code>.
When the management context path is set to <code>/</code>, the discovery page is disabled to prevent the possibility of a clash with other mappings.</p> <h3 id="_2-6-cors-support"><a href="#_2-6-cors-support" class="header-anchor">#</a> 2.6. CORS Support</h3> <p><a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing" target="_blank" rel="noopener noreferrer">Cross-origin resource sharing<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> (CORS) is a <a href="https://www.w3.org/TR/cors/" target="_blank" rel="noopener noreferrer">W3C specification<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> that lets you specify in a flexible way what kind of cross-domain requests are authorized.
If you use Spring MVC or Spring WebFlux, you can configure Actuator’s web endpoints to support such scenarios.</p> <p>CORS support is disabled by default and is only enabled once you have set the <code>management.endpoints.web.cors.allowed-origins</code> property.
The following configuration permits <code>GET</code> and <code>POST</code> calls from the <code>example.com</code> domain:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.cors.allowed-origins=https://example.com
management.endpoints.web.cors.allowed-methods=GET,POST
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      cors:
        allowed-origins: &quot;https://example.com&quot;
        allowed-methods: &quot;GET,POST&quot;
</code></pre></div><table><thead><tr><th></th> <th>See <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/CorsEndpointProperties.java" target="_blank" rel="noopener noreferrer"><code>CorsEndpointProperties</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> for a complete list of options.</th></tr></thead> <tbody></tbody></table> <h3 id="_2-7-implementing-custom-endpoints"><a href="#_2-7-implementing-custom-endpoints" class="header-anchor">#</a> 2.7. Implementing Custom Endpoints</h3> <p>If you add a <code>@Bean</code> annotated with <code>@Endpoint</code>, any methods annotated with <code>@ReadOperation</code>, <code>@WriteOperation</code>, or <code>@DeleteOperation</code> are automatically exposed over JMX and, in a web application, over HTTP as well.
Endpoints can be exposed over HTTP by using Jersey, Spring MVC, or Spring WebFlux.
If both Jersey and Spring MVC are available, Spring MVC is used.</p> <p>The following example exposes a read operation that returns a custom object:</p> <div class="language- extra-class"><pre class="language-text"><code>@ReadOperation
public CustomData getData() {
    return new CustomData(&quot;test&quot;, 5);
}

</code></pre></div><p>You can also write technology-specific endpoints by using <code>@JmxEndpoint</code> or <code>@WebEndpoint</code>.
These endpoints are restricted to their respective technologies.
For example, <code>@WebEndpoint</code> is exposed only over HTTP and not over JMX.</p> <p>You can write technology-specific extensions by using <code>@EndpointWebExtension</code> and <code>@EndpointJmxExtension</code>.
These annotations let you provide technology-specific operations to augment an existing endpoint.</p> <p>Finally, if you need access to web-framework-specific functionality, you can implement servlet or Spring <code>@Controller</code> and <code>@RestController</code> endpoints at the cost of them not being available over JMX or when using a different web framework.</p> <h4 id="_2-7-1-receiving-input"><a href="#_2-7-1-receiving-input" class="header-anchor">#</a> 2.7.1. Receiving Input</h4> <p>Operations on an endpoint receive input through their parameters.
When exposed over the web, the values for these parameters are taken from the URL’s query parameters and from the JSON request body.
When exposed over JMX, the parameters are mapped to the parameters of the MBean’s operations.
Parameters are required by default.
They can be made optional by annotating them with either <code>@javax.annotation.Nullable</code> or <code>@org.springframework.lang.Nullable</code>.</p> <p>You can map each root property in the JSON request body to a parameter of the endpoint.
Consider the following JSON request body:</p> <div class="language- extra-class"><pre class="language-text"><code>{
    &quot;name&quot;: &quot;test&quot;,
    &quot;counter&quot;: 42
}
</code></pre></div><p>You can use this to invoke a write operation that takes <code>String name</code> and <code>int counter</code> parameters, as the following example shows:</p> <div class="language- extra-class"><pre class="language-text"><code>@WriteOperation
public void updateData(String name, int counter) {
    // injects &quot;test&quot; and 42
}

</code></pre></div><table><thead><tr><th></th> <th>Because endpoints are technology agnostic, only simple types can be specified in the method signature.<br>In particular, declaring a single parameter with a <code>CustomData</code> type that defines a <code>name</code> and <code>counter</code> properties is not supported.</th></tr></thead> <tbody></tbody></table> <table><thead><tr><th></th> <th>To let the input be mapped to the operation method’s parameters, Java code that implements an endpoint should be compiled with <code>-parameters</code>, and Kotlin code that implements an endpoint should be compiled with <code>-java-parameters</code>.<br>This will happen automatically if you use Spring Boot’s Gradle plugin or if you use Maven and <code>spring-boot-starter-parent</code>.</th></tr></thead> <tbody></tbody></table> <h5 id="input-type-conversion"><a href="#input-type-conversion" class="header-anchor">#</a> Input Type Conversion</h5> <p>The parameters passed to endpoint operation methods are, if necessary, automatically converted to the required type.
Before calling an operation method, the input received over JMX or HTTP is converted to the required types by using an instance of <code>ApplicationConversionService</code> as well as any <code>Converter</code> or <code>GenericConverter</code> beans qualified with <code>@EndpointConverter</code>.</p> <h4 id="_2-7-2-custom-web-endpoints"><a href="#_2-7-2-custom-web-endpoints" class="header-anchor">#</a> 2.7.2. Custom Web Endpoints</h4> <p>Operations on an <code>@Endpoint</code>, <code>@WebEndpoint</code>, or <code>@EndpointWebExtension</code> are automatically exposed over HTTP using Jersey, Spring MVC, or Spring WebFlux.
If both Jersey and Spring MVC are available, Spring MVC is used.</p> <h5 id="web-endpoint-request-predicates"><a href="#web-endpoint-request-predicates" class="header-anchor">#</a> Web Endpoint Request Predicates</h5> <p>A request predicate is automatically generated for each operation on a web-exposed endpoint.</p> <h5 id="path"><a href="#path" class="header-anchor">#</a> Path</h5> <p>The path of the predicate is determined by the ID of the endpoint and the base path of the web-exposed endpoints.
The default base path is <code>/actuator</code>.
For example, an endpoint with an ID of <code>sessions</code> uses <code>/actuator/sessions</code> as its path in the predicate.</p> <p>You can further customize the path by annotating one or more parameters of the operation method with <code>@Selector</code>.
Such a parameter is added to the path predicate as a path variable.
The variable’s value is passed into the operation method when the endpoint operation is invoked.
If you want to capture all remaining path elements, you can add <code>@Selector(Match=ALL_REMAINING)</code> to the last parameter and make it a type that is conversion-compatible with a <code>String[]</code>.</p> <h5 id="http-method"><a href="#http-method" class="header-anchor">#</a> HTTP method</h5> <p>The HTTP method of the predicate is determined by the operation type, as shown in the following table:</p> <table><thead><tr><th>Operation</th> <th>HTTP method</th></tr></thead> <tbody><tr><td><code>@ReadOperation</code></td> <td><code>GET</code></td></tr> <tr><td><code>@WriteOperation</code></td> <td><code>POST</code></td></tr> <tr><td><code>@DeleteOperation</code></td> <td><code>DELETE</code></td></tr></tbody></table> <h5 id="consumes"><a href="#consumes" class="header-anchor">#</a> Consumes</h5> <p>For a <code>@WriteOperation</code> (HTTP <code>POST</code>) that uses the request body, the <code>consumes</code> clause of the predicate is <code>application/vnd.spring-boot.actuator.v2+json, application/json</code>.
For all other operations, the <code>consumes</code> clause is empty.</p> <h5 id="produces"><a href="#produces" class="header-anchor">#</a> Produces</h5> <p>The <code>produces</code> clause of the predicate can be determined by the <code>produces</code> attribute of the <code>@DeleteOperation</code>, <code>@ReadOperation</code>, and <code>@WriteOperation</code> annotations.
The attribute is optional.
If it is not used, the <code>produces</code> clause is determined automatically.</p> <p>If the operation method returns <code>void</code> or <code>Void</code>, the <code>produces</code> clause is empty.
If the operation method returns a <code>org.springframework.core.io.Resource</code>, the <code>produces</code> clause is <code>application/octet-stream</code>.
For all other operations, the <code>produces</code> clause is <code>application/vnd.spring-boot.actuator.v2+json, application/json</code>.</p> <h5 id="web-endpoint-response-status"><a href="#web-endpoint-response-status" class="header-anchor">#</a> Web Endpoint Response Status</h5> <p>The default response status for an endpoint operation depends on the operation type (read, write, or delete) and what, if anything, the operation returns.</p> <p>If a <code>@ReadOperation</code> returns a value, the response status will be 200 (OK).
If it does not return a value, the response status will be 404 (Not Found).</p> <p>If a <code>@WriteOperation</code> or <code>@DeleteOperation</code> returns a value, the response status will be 200 (OK).
If it does not return a value, the response status will be 204 (No Content).</p> <p>If an operation is invoked without a required parameter or with a parameter that cannot be converted to the required type, the operation method is not called, and the response status will be 400 (Bad Request).</p> <h5 id="web-endpoint-range-requests"><a href="#web-endpoint-range-requests" class="header-anchor">#</a> Web Endpoint Range Requests</h5> <p>You can use an HTTP range request to request part of an HTTP resource.
When using Spring MVC or Spring Web Flux, operations that return a <code>org.springframework.core.io.Resource</code> automatically support range requests.</p> <table><thead><tr><th></th> <th>Range requests are not supported when using Jersey.</th></tr></thead> <tbody></tbody></table> <h5 id="web-endpoint-security"><a href="#web-endpoint-security" class="header-anchor">#</a> Web Endpoint Security</h5> <p>An operation on a web endpoint or a web-specific endpoint extension can receive the current <code>java.security.Principal</code> or <code>org.springframework.boot.actuate.endpoint.SecurityContext</code> as a method parameter.
The former is typically used in conjunction with <code>@Nullable</code> to provide different behavior for authenticated and unauthenticated users.
The latter is typically used to perform authorization checks by using its <code>isUserInRole(String)</code> method.</p> <h4 id="_2-7-3-servlet-endpoints"><a href="#_2-7-3-servlet-endpoints" class="header-anchor">#</a> 2.7.3. Servlet Endpoints</h4> <p>A servlet can be exposed as an endpoint by implementing a class annotated with <code>@ServletEndpoint</code> that also implements <code>Supplier&lt;EndpointServlet&gt;</code>.
Servlet endpoints provide deeper integration with the servlet container but at the expense of portability.
They are intended to be used to expose an existing servlet as an endpoint.
For new endpoints, the <code>@Endpoint</code> and <code>@WebEndpoint</code> annotations should be preferred whenever possible.</p> <h4 id="_2-7-4-controller-endpoints"><a href="#_2-7-4-controller-endpoints" class="header-anchor">#</a> 2.7.4. Controller Endpoints</h4> <p>You can use <code>@ControllerEndpoint</code> and <code>@RestControllerEndpoint</code> to implement an endpoint that is exposed only by Spring MVC or Spring WebFlux.
Methods are mapped by using the standard annotations for Spring MVC and Spring WebFlux, such as <code>@RequestMapping</code> and <code>@GetMapping</code>, with the endpoint’s ID being used as a prefix for the path.
Controller endpoints provide deeper integration with Spring’s web frameworks but at the expense of portability.
The <code>@Endpoint</code> and <code>@WebEndpoint</code> annotations should be preferred whenever possible.</p> <h3 id="_2-8-health-information"><a href="#_2-8-health-information" class="header-anchor">#</a> 2.8. Health Information</h3> <p>You can use health information to check the status of your running application.
It is often used by monitoring software to alert someone when a production system goes down.
The information exposed by the <code>health</code> endpoint depends on the <code>management.endpoint.health.show-details</code> and <code>management.endpoint.health.show-components</code> properties, which can be configured with one of the following values:</p> <table><thead><tr><th>Name</th> <th>Description</th></tr></thead> <tbody><tr><td><code>never</code></td> <td>Details are never shown.</td></tr> <tr><td><code>when-authorized</code></td> <td>Details are shown only to authorized users.<br>Authorized roles can be configured by using <code>management.endpoint.health.roles</code>.</td></tr> <tr><td><code>always</code></td> <td>Details are shown to all users.</td></tr></tbody></table> <p>The default value is <code>never</code>.
A user is considered to be authorized when they are in one or more of the endpoint’s roles.
If the endpoint has no configured roles (the default), all authenticated users are considered to be authorized.
You can configure the roles by using the <code>management.endpoint.health.roles</code> property.</p> <table><thead><tr><th></th> <th>If you have secured your application and wish to use <code>always</code>, your security configuration must permit access to the health endpoint for both authenticated and unauthenticated users.</th></tr></thead> <tbody></tbody></table> <p>Health information is collected from the content of a <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthContributorRegistry.java" target="_blank" rel="noopener noreferrer"><code>HealthContributorRegistry</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> (by default, all <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthContributor.java" target="_blank" rel="noopener noreferrer"><code>HealthContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> instances defined in your <code>ApplicationContext</code>).
Spring Boot includes a number of auto-configured <code>HealthContributors</code>, and you can also write your own.</p> <p>A <code>HealthContributor</code> can be either a <code>HealthIndicator</code> or a <code>CompositeHealthContributor</code>.
A <code>HealthIndicator</code> provides actual health information, including a <code>Status</code>.
A <code>CompositeHealthContributor</code> provides a composite of other <code>HealthContributors</code>.
Taken together, contributors form a tree structure to represent the overall system health.</p> <p>By default, the final system health is derived by a <code>StatusAggregator</code>, which sorts the statuses from each <code>HealthIndicator</code> based on an ordered list of statuses.
The first status in the sorted list is used as the overall health status.
If no <code>HealthIndicator</code> returns a status that is known to the <code>StatusAggregator</code>, an <code>UNKNOWN</code> status is used.</p> <table><thead><tr><th></th> <th>You can use the <code>HealthContributorRegistry</code> to register and unregister health indicators at runtime.</th></tr></thead> <tbody></tbody></table> <h4 id="_2-8-1-auto-configured-healthindicators"><a href="#_2-8-1-auto-configured-healthindicators" class="header-anchor">#</a> 2.8.1. Auto-configured HealthIndicators</h4> <p>When appropriate, Spring Boot auto-configures the <code>HealthIndicators</code> listed in the following table.
You can also enable or disable selected indicators by configuring <code>management.health.key.enabled</code>,
with the <code>key</code> listed in the following table:</p> <table><thead><tr><th>Key</th> <th>Name</th> <th>Description</th></tr></thead> <tbody><tr><td><code>cassandra</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cassandra/CassandraDriverHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>CassandraDriverHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Cassandra database is up.</td></tr> <tr><td><code>couchbase</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/couchbase/CouchbaseHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>CouchbaseHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Couchbase cluster is up.</td></tr> <tr><td><code>db</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>DataSourceHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a connection to <code>DataSource</code> can be obtained.</td></tr> <tr><td><code>diskspace</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>DiskSpaceHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks for low disk space.</td></tr> <tr><td><code>elasticsearch</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>ElasticsearchRestHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that an Elasticsearch cluster is up.</td></tr> <tr><td><code>hazelcast</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>HazelcastHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Hazelcast server is up.</td></tr> <tr><td><code>influxdb</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>InfluxDbHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that an InfluxDB server is up.</td></tr> <tr><td><code>jms</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/jms/JmsHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>JmsHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a JMS broker is up.</td></tr> <tr><td><code>ldap</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/ldap/LdapHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>LdapHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that an LDAP server is up.</td></tr> <tr><td><code>mail</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/mail/MailHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>MailHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a mail server is up.</td></tr> <tr><td><code>mongo</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/mongo/MongoHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>MongoHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Mongo database is up.</td></tr> <tr><td><code>neo4j</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>Neo4jHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Neo4j database is up.</td></tr> <tr><td><code>ping</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/PingHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>PingHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Always responds with <code>UP</code>.</td></tr> <tr><td><code>rabbit</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/amqp/RabbitHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>RabbitHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Rabbit server is up.</td></tr> <tr><td><code>redis</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/redis/RedisHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>RedisHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Redis server is up.</td></tr> <tr><td><code>solr</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/solr/SolrHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>SolrHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Solr server is up.</td></tr></tbody></table> <table><thead><tr><th></th> <th>You can disable them all by setting the <code>management.health.defaults.enabled</code> property.</th></tr></thead> <tbody></tbody></table> <p>Additional <code>HealthIndicators</code> are available but are not enabled by default:</p> <table><thead><tr><th>Key</th> <th>Name</th> <th>Description</th></tr></thead> <tbody><tr><td><code>livenessstate</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/LivenessStateHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>LivenessStateHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes the “Liveness” application availability state.</td></tr> <tr><td><code>readinessstate</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/availability/ReadinessStateHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>ReadinessStateHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes the “Readiness” application availability state.</td></tr></tbody></table> <h4 id="_2-8-2-writing-custom-healthindicators"><a href="#_2-8-2-writing-custom-healthindicators" class="header-anchor">#</a> 2.8.2. Writing Custom HealthIndicators</h4> <p>To provide custom health information, you can register Spring beans that implement the <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>HealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> interface.
You need to provide an implementation of the <code>health()</code> method and return a <code>Health</code> response.
The <code>Health</code> response should include a status and can optionally include additional details to be displayed.
The following code shows a sample <code>HealthIndicator</code> implementation:</p> <div class="language- extra-class"><pre class="language-text"><code>import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

@Component
public class MyHealthIndicator implements HealthIndicator {

    @Override
    public Health health() {
        int errorCode = check();
        if (errorCode != 0) {
            return Health.down().withDetail(&quot;Error Code&quot;, errorCode).build();
        }
        return Health.up().build();
    }

    private int check() {
        // perform some specific health check
        return ...
    }

}

</code></pre></div><table><thead><tr><th></th> <th>The identifier for a given <code>HealthIndicator</code> is the name of the bean without the <code>HealthIndicator</code> suffix, if it exists.<br>In the preceding example, the health information is available in an entry named <code>my</code>.</th></tr></thead> <tbody></tbody></table> <p>In addition to Spring Boot’s predefined <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Status.java" target="_blank" rel="noopener noreferrer"><code>Status</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> types, <code>Health</code> can return a custom <code>Status</code> that represents a new system state.
In such cases, you also need to provide a custom implementation of the <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/StatusAggregator.java" target="_blank" rel="noopener noreferrer"><code>StatusAggregator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> interface, or you must configure the default implementation by using the <code>management.endpoint.health.status.order</code> configuration property.</p> <p>For example, assume a new <code>Status</code> with a code of <code>FATAL</code> is being used in one of your <code>HealthIndicator</code> implementations.
To configure the severity order, add the following property to your application properties:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.status.order=fatal,down,out-of-service,unknown,up
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      status:
        order: &quot;fatal,down,out-of-service,unknown,up&quot;
</code></pre></div><p>The HTTP status code in the response reflects the overall health status.
By default, <code>OUT_OF_SERVICE</code> and <code>DOWN</code> map to 503.
Any unmapped health statuses, including <code>UP</code>, map to 200.
You might also want to register custom status mappings if you access the health endpoint over HTTP.
Configuring a custom mapping disables the defaults mappings for <code>DOWN</code> and <code>OUT_OF_SERVICE</code>.
If you want to retain the default mappings, you must explicitly configure them, alongside any custom mappings.
For example, the following property maps <code>FATAL</code> to 503 (service unavailable) and retains the default mappings for <code>DOWN</code> and <code>OUT_OF_SERVICE</code>:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.status.http-mapping.down=503
management.endpoint.health.status.http-mapping.fatal=503
management.endpoint.health.status.http-mapping.out-of-service=503
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      status:
        http-mapping:
          down: 503
          fatal: 503
          out-of-service: 503
</code></pre></div><table><thead><tr><th></th> <th>If you need more control, you can define your own <code>HttpCodeStatusMapper</code> bean.</th></tr></thead> <tbody></tbody></table> <p>The following table shows the default status mappings for the built-in statuses:</p> <table><thead><tr><th>Status</th> <th>Mapping</th></tr></thead> <tbody><tr><td><code>DOWN</code></td> <td><code>SERVICE_UNAVAILABLE</code> (<code>503</code>)</td></tr> <tr><td><code>OUT_OF_SERVICE</code></td> <td><code>SERVICE_UNAVAILABLE</code> (<code>503</code>)</td></tr> <tr><td><code>UP</code></td> <td>No mapping by default, so HTTP status is <code>200</code></td></tr> <tr><td><code>UNKNOWN</code></td> <td>No mapping by default, so HTTP status is <code>200</code></td></tr></tbody></table> <h4 id="_2-8-3-reactive-health-indicators"><a href="#_2-8-3-reactive-health-indicators" class="header-anchor">#</a> 2.8.3. Reactive Health Indicators</h4> <p>For reactive applications, such as those that use Spring WebFlux, <code>ReactiveHealthContributor</code> provides a non-blocking contract for getting application health.
Similar to a traditional <code>HealthContributor</code>, health information is collected from the content of a <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/ReactiveHealthContributorRegistry.java" target="_blank" rel="noopener noreferrer"><code>ReactiveHealthContributorRegistry</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> (by default, all <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthContributor.java" target="_blank" rel="noopener noreferrer"><code>HealthContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> and <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/ReactiveHealthContributor.java" target="_blank" rel="noopener noreferrer"><code>ReactiveHealthContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> instances defined in your <code>ApplicationContext</code>).
Regular <code>HealthContributors</code> that do not check against a reactive API are executed on the elastic scheduler.</p> <table><thead><tr><th></th> <th>In a reactive application, you should use the <code>ReactiveHealthContributorRegistry</code> to register and unregister health indicators at runtime.<br>If you need to register a regular <code>HealthContributor</code>, you should wrap it with <code>ReactiveHealthContributor#adapt</code>.</th></tr></thead> <tbody></tbody></table> <p>To provide custom health information from a reactive API, you can register Spring beans that implement the <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/ReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>ReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> interface.
The following code shows a sample <code>ReactiveHealthIndicator</code> implementation:</p> <div class="language- extra-class"><pre class="language-text"><code>import reactor.core.publisher.Mono;

import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.ReactiveHealthIndicator;
import org.springframework.stereotype.Component;

@Component
public class MyReactiveHealthIndicator implements ReactiveHealthIndicator {

    @Override
    public Mono&lt;Health&gt; health() {
        return doHealthCheck().onErrorResume((exception) -&gt;
            Mono.just(new Health.Builder().down(exception).build()));
    }

    private Mono&lt;Health&gt; doHealthCheck() {
        // perform some specific health check
        return ...
    }

}

</code></pre></div><table><thead><tr><th></th> <th>To handle the error automatically, consider extending from <code>AbstractReactiveHealthIndicator</code>.</th></tr></thead> <tbody></tbody></table> <h4 id="_2-8-4-auto-configured-reactivehealthindicators"><a href="#_2-8-4-auto-configured-reactivehealthindicators" class="header-anchor">#</a> 2.8.4. Auto-configured ReactiveHealthIndicators</h4> <p>When appropriate, Spring Boot auto-configures the following <code>ReactiveHealthIndicators</code>:</p> <table><thead><tr><th>Key</th> <th>Name</th> <th>Description</th></tr></thead> <tbody><tr><td><code>cassandra</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cassandra/CassandraDriverReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>CassandraDriverReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Cassandra database is up.</td></tr> <tr><td><code>couchbase</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/couchbase/CouchbaseReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>CouchbaseReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Couchbase cluster is up.</td></tr> <tr><td><code>elasticsearch</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/elasticsearch/ElasticsearchReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>ElasticsearchReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that an Elasticsearch cluster is up.</td></tr> <tr><td><code>mongo</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/mongo/MongoReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>MongoReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Mongo database is up.</td></tr> <tr><td><code>neo4j</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>Neo4jReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Neo4j database is up.</td></tr> <tr><td><code>redis</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/redis/RedisReactiveHealthIndicator.java" target="_blank" rel="noopener noreferrer"><code>RedisReactiveHealthIndicator</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Checks that a Redis server is up.</td></tr></tbody></table> <table><thead><tr><th></th> <th>If necessary, reactive indicators replace the regular ones.<br>Also, any <code>HealthIndicator</code> that is not handled explicitly is wrapped automatically.</th></tr></thead> <tbody></tbody></table> <h4 id="_2-8-5-health-groups"><a href="#_2-8-5-health-groups" class="header-anchor">#</a> 2.8.5. Health Groups</h4> <p>It is sometimes useful to organize health indicators into groups that you can use for different purposes.</p> <p>To create a health indicator group, you can use the <code>management.endpoint.health.group.&lt;name&gt;</code> property and specify a list of health indicator IDs to <code>include</code> or <code>exclude</code>.
For example, to create a group that includes only database indicators you can define the following:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.custom.include=db
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      group:
        custom:
          include: &quot;db&quot;
</code></pre></div><p>You can then check the result by hitting <code>[localhost:8080/actuator/health/custom](http://localhost:8080/actuator/health/custom)</code>.</p> <p>Similarly, to create a group that excludes the database indicators from the group and includes all the other indicators, you can define the following:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.custom.exclude=db
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      group:
        custom:
          exclude: &quot;db&quot;
</code></pre></div><p>By default, groups inherit the same <code>StatusAggregator</code> and <code>HttpCodeStatusMapper</code> settings as the system health.
However, you can also define these on a per-group basis.
You can also override the <code>show-details</code> and <code>roles</code> properties if required:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.custom.show-details=when-authorized
management.endpoint.health.group.custom.roles=admin
management.endpoint.health.group.custom.status.order=fatal,up
management.endpoint.health.group.custom.status.http-mapping.fatal=500
management.endpoint.health.group.custom.status.http-mapping.out-of-service=500
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      group:
        custom:
          show-details: &quot;when-authorized&quot;
          roles: &quot;admin&quot;
          status:
            order: &quot;fatal,up&quot;
            http-mapping:
              fatal: 500
              out-of-service: 500
</code></pre></div><table><thead><tr><th></th> <th>You can use <code>@Qualifier(&quot;groupname&quot;)</code> if you need to register custom <code>StatusAggregator</code> or <code>HttpCodeStatusMapper</code> beans for use with the group.</th></tr></thead> <tbody></tbody></table> <p>A health group can also include/exclude a <code>CompositeHealthContributor</code>.
You can also include/exclude only a certain component of a <code>CompositeHealthContributor</code>.
This can be done using the fully qualified name of the component as follows:</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.custom.include=&quot;test/primary&quot;
management.endpoint.health.group.custom.exclude=&quot;test/primary/b&quot;
</code></pre></div><p>In the example above, the <code>custom</code> group will include the <code>HealthContributor</code> with the name <code>primary</code> which is a component of the composite <code>test</code>.
Here, <code>primary</code> itself is a composite and the <code>HealthContributor</code> with the name <code>b</code> will be excluded from the <code>custom</code> group.</p> <p>Health groups can be made available at an additional path on either the main or management port.
This is useful in cloud environments such as Kubernetes, where it is quite common to use a separate management port for the actuator endpoints for security purposes.
Having a separate port could lead to unreliable health checks because the main application might not work properly even if the health check is successful.
The health group can be configured with an additional path as follows:</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.live.additional-path=&quot;server:/healthz&quot;
</code></pre></div><p>This would make the <code>live</code> health group available on the main server port at <code>/healthz</code>.
The prefix is mandatory and must be either <code>server:</code> (represents the main server port) or <code>management:</code> (represents the management port, if configured.)
The path must be a single path segment.</p> <h4 id="_2-8-6-datasource-health"><a href="#_2-8-6-datasource-health" class="header-anchor">#</a> 2.8.6. DataSource Health</h4> <p>The <code>DataSource</code> health indicator shows the health of both standard data sources and routing data source beans.
The health of a routing data source includes the health of each of its target data sources.
In the health endpoint’s response, each of a routing data source’s targets is named by using its routing key.
If you prefer not to include routing data sources in the indicator’s output, set <code>management.health.db.ignore-routing-data-sources</code> to <code>true</code>.</p> <h3 id="_2-9-kubernetes-probes"><a href="#_2-9-kubernetes-probes" class="header-anchor">#</a> 2.9. Kubernetes Probes</h3> <p>Applications deployed on Kubernetes can provide information about their internal state with <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes" target="_blank" rel="noopener noreferrer">Container Probes<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
Depending on <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" target="_blank" rel="noopener noreferrer">your Kubernetes configuration<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, the kubelet calls those probes and reacts to the result.</p> <p>By default, Spring Boot manages your <a href="/en/spring-boot/features.html#features.spring-application.application-availability">Application Availability State</a>.
If deployed in a Kubernetes environment, actuator gathers the “Liveness” and “Readiness” information from the <code>ApplicationAvailability</code> interface and uses that information in dedicated <a href="#actuator.endpoints.health.auto-configured-health-indicators">health indicators</a>: <code>LivenessStateHealthIndicator</code> and <code>ReadinessStateHealthIndicator</code>.
These indicators are shown on the global health endpoint (<code>&quot;/actuator/health&quot;</code>).
They are also exposed as separate HTTP Probes by using <a href="#actuator.endpoints.health.groups">health groups</a>: <code>&quot;/actuator/health/liveness&quot;</code> and <code>&quot;/actuator/health/readiness&quot;</code>.</p> <p>You can then configure your Kubernetes infrastructure with the following endpoint information:</p> <div class="language- extra-class"><pre class="language-text"><code>livenessProbe:
  httpGet:
    path: &quot;/actuator/health/liveness&quot;
    port: &lt;actuator-port&gt;
  failureThreshold: ...
  periodSeconds: ...

readinessProbe:
  httpGet:
    path: &quot;/actuator/health/readiness&quot;
    port: &lt;actuator-port&gt;
  failureThreshold: ...
  periodSeconds: ...
</code></pre></div><table><thead><tr><th></th> <th><code>&lt;actuator-port&gt;</code> should be set to the port that the actuator endpoints are available on.<br>It could be the main web server port or a separate management port if the <code>&quot;management.server.port&quot;</code> property has been set.</th></tr></thead> <tbody></tbody></table> <p>These health groups are automatically enabled only if the application <a href="/en/spring-boot/deployment.html#deployment.cloud.kubernetes">runs in a Kubernetes environment</a>.
You can enable them in any environment by using the <code>management.endpoint.health.probes.enabled</code> configuration property.</p> <table><thead><tr><th></th> <th>If an application takes longer to start than the configured liveness period, Kubernetes mentions the <code>&quot;startupProbe&quot;</code> as a possible solution.<br>The <code>&quot;startupProbe&quot;</code> is not necessarily needed here, as the <code>&quot;readinessProbe&quot;</code> fails until all startup tasks are done. See the section that describes <a href="#actuator.endpoints.kubernetes-probes.lifecycle">how probes behave during the application lifecycle</a>.</th></tr></thead> <tbody></tbody></table> <p>If your Actuator endpoints are deployed on a separate management context, the endpoints do not use the same web infrastructure (port, connection pools, framework components) as the main application.
In this case, a probe check could be successful even if the main application does not work properly (for example, it cannot accept new connections).
For this reason, is it a good idea to make the <code>liveness</code> and <code>readiness</code> health groups available on the main server port.
This can be done by setting the following property:</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.probes.add-additional-paths=true
</code></pre></div><p>This would make <code>liveness</code> available at <code>/livez</code> and <code>readiness</code> at <code>readyz</code> on the main server port.</p> <h4 id="_2-9-1-checking-external-state-with-kubernetes-probes"><a href="#_2-9-1-checking-external-state-with-kubernetes-probes" class="header-anchor">#</a> 2.9.1. Checking External State with Kubernetes Probes</h4> <p>Actuator configures the “liveness” and “readiness” probes as Health Groups.
This means that all the <a href="#actuator.endpoints.health.groups">health groups features</a> are available for them.
You can, for example, configure additional Health Indicators:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.health.group.readiness.include=readinessState,customCheck
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    health:
      group:
        readiness:
          include: &quot;readinessState,customCheck&quot;
</code></pre></div><p>By default, Spring Boot does not add other health indicators to these groups.</p> <p>The “liveness” probe should not depend on health checks for external systems.
If the <a href="/en/spring-boot/features.html#features.spring-application.application-availability.liveness">liveness state of an application</a> is broken, Kubernetes tries to solve that problem by restarting the application instance.
This means that if an external system (such as a database, a Web API, or an external cache) fails, Kubernetes might restart all application instances and create cascading failures.</p> <p>As for the “readiness” probe, the choice of checking external systems must be made carefully by the application developers.
For this reason, Spring Boot does not include any additional health checks in the readiness probe.
If the <a href="/en/spring-boot/features.html#features.spring-application.application-availability.readiness">readiness state of an application instance</a> is unready, Kubernetes does not route traffic to that instance.
Some external systems might not be shared by application instances, in which case they could be included in a readiness probe.
Other external systems might not be essential to the application (the application could have circuit breakers and fallbacks), in which case they definitely should not be included.
Unfortunately, an external system that is shared by all application instances is common, and you have to make a judgement call: Include it in the readiness probe and expect that the application is taken out of service when the external service is down or leave it out and deal with failures higher up the stack, perhaps by using a circuit breaker in the caller.</p> <table><thead><tr><th></th> <th>If all instances of an application are unready, a Kubernetes Service with <code>type=ClusterIP</code> or <code>NodePort</code> does not accept any incoming connections.<br>There is no HTTP error response (503 and so on), since there is no connection.<br>A service with <code>type=LoadBalancer</code> might or might not accept connections, depending on the provider.<br>A service that has an explicit <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" target="_blank" rel="noopener noreferrer">ingress<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> also responds in a way that depends on the implementation — the ingress service itself has to decide how to handle the “connection refused” from downstream.<br>HTTP 503 is quite likely in the case of both load balancer and ingress.</th></tr></thead> <tbody></tbody></table> <p>Also, if an application uses Kubernetes <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" target="_blank" rel="noopener noreferrer">autoscaling<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, it may react differently to applications being taken out of the load-balancer, depending on its autoscaler configuration.</p> <h4 id="_2-9-2-application-lifecycle-and-probe-states"><a href="#_2-9-2-application-lifecycle-and-probe-states" class="header-anchor">#</a> 2.9.2. Application Lifecycle and Probe States</h4> <p>An important aspect of the Kubernetes Probes support is its consistency with the application lifecycle.
There is a significant difference between the <code>AvailabilityState</code> (which is the in-memory, internal state of the application)
and the actual probe (which exposes that state).
Depending on the phase of application lifecycle, the probe might not be available.</p> <p>Spring Boot publishes <a href="/en/spring-boot/features.html#features.spring-application.application-events-and-listeners">application events during startup and shutdown</a>,
and probes can listen to such events and expose the <code>AvailabilityState</code> information.</p> <p>The following tables show the <code>AvailabilityState</code> and the state of HTTP connectors at different stages.</p> <p>When a Spring Boot application starts:</p> <table><thead><tr><th>Startup phase</th> <th>LivenessState</th> <th>ReadinessState</th> <th>HTTP server</th> <th>Notes</th></tr></thead> <tbody><tr><td>Starting</td> <td><code>BROKEN</code></td> <td><code>REFUSING_TRAFFIC</code></td> <td>Not started</td> <td>Kubernetes checks the &quot;liveness&quot; Probe and restarts the application if it takes too long.</td></tr> <tr><td>Started</td> <td><code>CORRECT</code></td> <td><code>REFUSING_TRAFFIC</code></td> <td>Refuses requests</td> <td>The application context is refreshed. The application performs startup tasks and does not receive traffic yet.</td></tr> <tr><td>Ready</td> <td><code>CORRECT</code></td> <td><code>ACCEPTING_TRAFFIC</code></td> <td>Accepts requests</td> <td>Startup tasks are finished. The application is receiving traffic.</td></tr></tbody></table> <p>When a Spring Boot application shuts down:</p> <table><thead><tr><th>Shutdown phase</th> <th>Liveness State</th> <th>Readiness State</th> <th>HTTP server</th> <th>Notes</th></tr></thead> <tbody><tr><td>Running</td> <td><code>CORRECT</code></td> <td><code>ACCEPTING_TRAFFIC</code></td> <td>Accepts requests</td> <td>Shutdown has been requested.</td></tr> <tr><td>Graceful shutdown</td> <td><code>CORRECT</code></td> <td><code>REFUSING_TRAFFIC</code></td> <td>New requests are rejected</td> <td>If enabled, <a href="/en/spring-boot/web.html#web.graceful-shutdown">graceful shutdown processes in-flight requests</a>.</td></tr> <tr><td>Shutdown complete</td> <td>N/A</td> <td>N/A</td> <td>Server is shut down</td> <td>The application context is closed and the application is shut down.</td></tr></tbody></table> <table><thead><tr><th></th> <th>See <a href="/en/spring-boot/deployment.html#deployment.cloud.kubernetes.container-lifecycle">Kubernetes container lifecycle section</a> for more information about Kubernetes deployment.</th></tr></thead> <tbody></tbody></table> <h3 id="_2-10-application-information"><a href="#_2-10-application-information" class="header-anchor">#</a> 2.10. Application Information</h3> <p>Application information exposes various information collected from all <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoContributor.java" target="_blank" rel="noopener noreferrer"><code>InfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> beans defined in your <code>ApplicationContext</code>.
Spring Boot includes a number of auto-configured <code>InfoContributor</code> beans, and you can write your own.</p> <h4 id="_2-10-1-auto-configured-infocontributors"><a href="#_2-10-1-auto-configured-infocontributors" class="header-anchor">#</a> 2.10.1. Auto-configured InfoContributors</h4> <p>When appropriate, Spring auto-configures the following <code>InfoContributor</code> beans:</p> <table><thead><tr><th>ID</th> <th>Name</th> <th>Description</th> <th>Prerequisites</th></tr></thead> <tbody><tr><td><code>build</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/BuildInfoContributor.java" target="_blank" rel="noopener noreferrer"><code>BuildInfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes build information.</td> <td>A <code>META-INF/build-info.properties</code> resource.</td></tr> <tr><td><code>env</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/EnvironmentInfoContributor.java" target="_blank" rel="noopener noreferrer"><code>EnvironmentInfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes any property from the <code>Environment</code> whose name starts with <code>info.</code>.</td> <td>None.</td></tr> <tr><td><code>git</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/GitInfoContributor.java" target="_blank" rel="noopener noreferrer"><code>GitInfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes git information.</td> <td>A <code>git.properties</code> resource.</td></tr> <tr><td><code>java</code></td> <td><a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/JavaInfoContributor.java" target="_blank" rel="noopener noreferrer"><code>JavaInfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></td> <td>Exposes Java runtime information.</td> <td>None.</td></tr></tbody></table> <p>Whether or not an individual contributor is enabled is controlled by its <code>management.info.&lt;id&gt;.enabled</code> property.
Different contributors have different defaults for this property, depending on their prerequisites and the nature of the information that they expose.</p> <p>With no prerequisites to indicate that they should be enabled, the <code>env</code> and <code>java</code> contributors are disabled by default.
You can enable them by setting the <code>management.info.env.enabled</code> or <code>management.info.java.enabled</code> properties to <code>true</code>.</p> <p>The <code>build</code> and <code>git</code> info contributors are enabled by default.
Each can be disabled by setting its <code>management.info.&lt;id&gt;.enabled</code> property to <code>false</code>.
Alternatively, to disable every contributor that is usually enabled by default, set the <code>management.info.defaults.enabled</code> property to <code>false</code>.</p> <h4 id="_2-10-2-custom-application-information"><a href="#_2-10-2-custom-application-information" class="header-anchor">#</a> 2.10.2. Custom Application Information</h4> <p>When the <code>env</code> contributor is enabled, you can customize the data exposed by the <code>info</code> endpoint by setting <code>info.*</code> Spring properties.
All <code>Environment</code> properties under the <code>info</code> key are automatically exposed.
For example, you could add the following settings to your <code>application.properties</code> file:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>info.app.encoding=UTF-8
info.app.java.source=11
info.app.java.target=11
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>info:
  app:
    encoding: &quot;UTF-8&quot;
    java:
      source: &quot;11&quot;
      target: &quot;11&quot;
</code></pre></div><table><thead><tr><th></th> <th>Rather than hardcoding those values, you could also <a href="/en/spring-boot/howto.html#howto.properties-and-configuration.expand-properties">expand info properties at build time</a>.<br><br>Assuming you use Maven, you could rewrite the preceding example as follows:<br><br>Properties<br><br><code>&lt;br/&gt;[email protected]@&lt;br/&gt;[email protected]@&lt;br/&gt;[email protected]@&lt;br/&gt;</code><br><br>Yaml<br><br><code>&lt;br/&gt;info:&lt;br/&gt; app:&lt;br/&gt; encoding: &quot;@[email protected]&quot;&lt;br/&gt; java:&lt;br/&gt; source: &quot;@[email protected]&quot;&lt;br/&gt; target: &quot;@[email protected]&quot;&lt;br/&gt;</code></th></tr></thead> <tbody></tbody></table> <h4 id="_2-10-3-git-commit-information"><a href="#_2-10-3-git-commit-information" class="header-anchor">#</a> 2.10.3. Git Commit Information</h4> <p>Another useful feature of the <code>info</code> endpoint is its ability to publish information about the state of your <code>git</code> source code repository when the project was built.
If a <code>GitProperties</code> bean is available, you can use the <code>info</code> endpoint to expose these properties.</p> <table><thead><tr><th></th> <th>A <code>GitProperties</code> bean is auto-configured if a <code>git.properties</code> file is available at the root of the classpath.<br>See &quot;<a href="/en/spring-boot/howto.html#howto.build.generate-git-info">how to generate git information</a>&quot; for more detail.</th></tr></thead> <tbody></tbody></table> <p>By default, the endpoint exposes <code>git.branch</code>, <code>git.commit.id</code>, and <code>git.commit.time</code> properties, if present.
If you do not want any of these properties in the endpoint response, they need to be excluded from the <code>git.properties</code> file.
If you want to display the full git information (that is, the full content of <code>git.properties</code>), use the <code>management.info.git.mode</code> property, as follows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.info.git.mode=full
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  info:
    git:
      mode: &quot;full&quot;
</code></pre></div><p>To disable the git commit information from the <code>info</code> endpoint completely, set the <code>management.info.git.enabled</code> property to <code>false</code>, as follows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.info.git.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  info:
    git:
      enabled: false
</code></pre></div><h4 id="_2-10-4-build-information"><a href="#_2-10-4-build-information" class="header-anchor">#</a> 2.10.4. Build Information</h4> <p>If a <code>BuildProperties</code> bean is available, the <code>info</code> endpoint can also publish information about your build.
This happens if a <code>META-INF/build-info.properties</code> file is available in the classpath.</p> <table><thead><tr><th></th> <th>The Maven and Gradle plugins can both generate that file.<br>See &quot;<a href="/en/spring-boot/howto.html#howto.build.generate-info">how to generate build information</a>&quot; for more details.</th></tr></thead> <tbody></tbody></table> <h4 id="_2-10-5-java-information"><a href="#_2-10-5-java-information" class="header-anchor">#</a> 2.10.5. Java Information</h4> <p>The <code>info</code> endpoint publishes information about your Java runtime environment, see <a href="https://docs.spring.io/spring-boot/docs/2.6.4/api/org/springframework/boot/info/JavaInfo.html" target="_blank" rel="noopener noreferrer"><code>JavaInfo</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> for more details.</p> <h4 id="_2-10-6-writing-custom-infocontributors"><a href="#_2-10-6-writing-custom-infocontributors" class="header-anchor">#</a> 2.10.6. Writing Custom InfoContributors</h4> <p>To provide custom application information, you can register Spring beans that implement the <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoContributor.java" target="_blank" rel="noopener noreferrer"><code>InfoContributor</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> interface.</p> <p>The following example contributes an <code>example</code> entry with a single value:</p> <div class="language- extra-class"><pre class="language-text"><code>import java.util.Collections;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;

@Component
public class MyInfoContributor implements InfoContributor {

    @Override
    public void contribute(Info.Builder builder) {
        builder.withDetail(&quot;example&quot;, Collections.singletonMap(&quot;key&quot;, &quot;value&quot;));
    }

}

</code></pre></div><p>If you reach the <code>info</code> endpoint, you should see a response that contains the following additional entry:</p> <div class="language- extra-class"><pre class="language-text"><code>{
    &quot;example&quot;: {
        &quot;key&quot; : &quot;value&quot;
    }
}
</code></pre></div><h2 id="_3-monitoring-and-management-over-http"><a href="#_3-monitoring-and-management-over-http" class="header-anchor">#</a> 3. Monitoring and Management over HTTP</h2> <p>If you are developing a web application, Spring Boot Actuator auto-configures all enabled endpoints to be exposed over HTTP.
The default convention is to use the <code>id</code> of the endpoint with a prefix of <code>/actuator</code> as the URL path.
For example, <code>health</code> is exposed as <code>/actuator/health</code>.</p> <table><thead><tr><th></th> <th>Actuator is supported natively with Spring MVC, Spring WebFlux, and Jersey.<br>If both Jersey and Spring MVC are available, Spring MVC is used.</th></tr></thead> <tbody></tbody></table> <table><thead><tr><th></th> <th>Jackson is a required dependency in order to get the correct JSON responses as documented in the API documentation (<a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/htmlsingle" target="_blank" rel="noopener noreferrer">HTML<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> or <a href="https://docs.spring.io/spring-boot/docs/2.6.4/actuator-api/pdf/spring-boot-actuator-web-api.pdf" target="_blank" rel="noopener noreferrer">PDF<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>).</th></tr></thead> <tbody></tbody></table> <h3 id="_3-1-customizing-the-management-endpoint-paths"><a href="#_3-1-customizing-the-management-endpoint-paths" class="header-anchor">#</a> 3.1. Customizing the Management Endpoint Paths</h3> <p>Sometimes, it is useful to customize the prefix for the management endpoints.
For example, your application might already use <code>/actuator</code> for another purpose.
You can use the <code>management.endpoints.web.base-path</code> property to change the prefix for your management endpoint, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.base-path=/manage
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      base-path: &quot;/manage&quot;
</code></pre></div><p>The preceding <code>application.properties</code> example changes the endpoint from <code>/actuator/{id}</code> to <code>/manage/{id}</code> (for example, <code>/manage/info</code>).</p> <table><thead><tr><th></th> <th>Unless the management port has been configured to <a href="#actuator.monitoring.customizing-management-server-port">expose endpoints by using a different HTTP port</a>, <code>management.endpoints.web.base-path</code> is relative to <code>server.servlet.context-path</code> (for servlet web applications) or <code>spring.webflux.base-path</code> (for reactive web applications).<br>If <code>management.server.port</code> is configured, <code>management.endpoints.web.base-path</code> is relative to <code>management.server.base-path</code>.</th></tr></thead> <tbody></tbody></table> <p>If you want to map endpoints to a different path, you can use the <code>management.endpoints.web.path-mapping</code> property.</p> <p>The following example remaps <code>/actuator/health</code> to <code>/healthcheck</code>:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.base-path=/
management.endpoints.web.path-mapping.health=healthcheck
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      base-path: &quot;/&quot;
      path-mapping:
        health: &quot;healthcheck&quot;
</code></pre></div><h3 id="_3-2-customizing-the-management-server-port"><a href="#_3-2-customizing-the-management-server-port" class="header-anchor">#</a> 3.2. Customizing the Management Server Port</h3> <p>Exposing management endpoints by using the default HTTP port is a sensible choice for cloud-based deployments.
If, however, your application runs inside your own data center, you may prefer to expose endpoints by using a different HTTP port.</p> <p>You can set the <code>management.server.port</code> property to change the HTTP port, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.server.port=8081
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  server:
    port: 8081
</code></pre></div><table><thead><tr><th></th> <th>On Cloud Foundry, by default, applications receive requests only on port 8080 for both HTTP and TCP routing.<br>If you want to use a custom management port on Cloud Foundry, you need to explicitly set up the application’s routes to forward traffic to the custom port.</th></tr></thead> <tbody></tbody></table> <h3 id="_3-3-configuring-management-specific-ssl"><a href="#_3-3-configuring-management-specific-ssl" class="header-anchor">#</a> 3.3. Configuring Management-specific SSL</h3> <p>When configured to use a custom port, you can also configure the management server with its own SSL by using the various <code>management.server.ssl.*</code> properties.
For example, doing so lets a management server be available over HTTP while the main application uses HTTPS, as the following property settings show:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>server.port=8443
server.ssl.enabled=true
server.ssl.key-store=classpath:store.jks
server.ssl.key-password=secret
management.server.port=8080
management.server.ssl.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>server:
  port: 8443
  ssl:
    enabled: true
    key-store: &quot;classpath:store.jks&quot;
    key-password: &quot;secret&quot;
management:
  server:
    port: 8080
    ssl:
      enabled: false
</code></pre></div><p>Alternatively, both the main server and the management server can use SSL but with different key stores, as follows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>server.port=8443
server.ssl.enabled=true
server.ssl.key-store=classpath:main.jks
server.ssl.key-password=secret
management.server.port=8080
management.server.ssl.enabled=true
management.server.ssl.key-store=classpath:management.jks
management.server.ssl.key-password=secret
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>server:
  port: 8443
  ssl:
    enabled: true
    key-store: &quot;classpath:main.jks&quot;
    key-password: &quot;secret&quot;
management:
  server:
    port: 8080
    ssl:
      enabled: true
      key-store: &quot;classpath:management.jks&quot;
      key-password: &quot;secret&quot;
</code></pre></div><h3 id="_3-4-customizing-the-management-server-address"><a href="#_3-4-customizing-the-management-server-address" class="header-anchor">#</a> 3.4. Customizing the Management Server Address</h3> <p>You can customize the address on which the management endpoints are available by setting the <code>management.server.address</code> property.
Doing so can be useful if you want to listen only on an internal or ops-facing network or to listen only for connections from <code>localhost</code>.</p> <table><thead><tr><th></th> <th>You can listen on a different address only when the port differs from the main server port.</th></tr></thead> <tbody></tbody></table> <p>The following example <code>application.properties</code> does not allow remote management connections:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.server.port=8081
management.server.address=127.0.0.1
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  server:
    port: 8081
    address: &quot;127.0.0.1&quot;
</code></pre></div><h3 id="_3-5-disabling-http-endpoints"><a href="#_3-5-disabling-http-endpoints" class="header-anchor">#</a> 3.5. Disabling HTTP Endpoints</h3> <p>If you do not want to expose endpoints over HTTP, you can set the management port to <code>-1</code>, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.server.port=-1
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  server:
    port: -1
</code></pre></div><p>You can also achieve this by using the <code>management.endpoints.web.exposure.exclude</code> property, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.web.exposure.exclude=*
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    web:
      exposure:
        exclude: &quot;*&quot;
</code></pre></div><h2 id="_4-monitoring-and-management-over-jmx"><a href="#_4-monitoring-and-management-over-jmx" class="header-anchor">#</a> 4. Monitoring and Management over JMX</h2> <p>Java Management Extensions (JMX) provide a standard mechanism to monitor and manage applications.
By default, this feature is not enabled.
You can turn it on by setting the <code>spring.jmx.enabled</code> configuration property to <code>true</code>.
Spring Boot exposes the most suitable <code>MBeanServer</code> as a bean with an ID of <code>mbeanServer</code>.
Any of your beans that are annotated with Spring JMX annotations (<code>@ManagedResource</code>, <code>@ManagedAttribute</code>, or <code>@ManagedOperation</code>) are exposed to it.</p> <p>If your platform provides a standard <code>MBeanServer</code>, Spring Boot uses that and defaults to the VM <code>MBeanServer</code>, if necessary.
If all that fails, a new <code>MBeanServer</code> is created.</p> <p>See the <a href="https://github.com/spring-projects/spring-boot/tree/v2.6.4/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfiguration.java" target="_blank" rel="noopener noreferrer"><code>JmxAutoConfiguration</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> class for more details.</p> <p>By default, Spring Boot also exposes management endpoints as JMX MBeans under the <code>org.springframework.boot</code> domain.
To take full control over endpoint registration in the JMX domain, consider registering your own <code>EndpointObjectNameFactory</code> implementation.</p> <h3 id="_4-1-customizing-mbean-names"><a href="#_4-1-customizing-mbean-names" class="header-anchor">#</a> 4.1. Customizing MBean Names</h3> <p>The name of the MBean is usually generated from the <code>id</code> of the endpoint.
For example, the <code>health</code> endpoint is exposed as <code>org.springframework.boot:type=Endpoint,name=Health</code>.</p> <p>If your application contains more than one Spring <code>ApplicationContext</code>, you may find that names clash.
To solve this problem, you can set the <code>spring.jmx.unique-names</code> property to <code>true</code> so that MBean names are always unique.</p> <p>You can also customize the JMX domain under which endpoints are exposed.
The following settings show an example of doing so in <code>application.properties</code>:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>spring.jmx.unique-names=true
management.endpoints.jmx.domain=com.example.myapp
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>spring:
  jmx:
    unique-names: true
management:
  endpoints:
    jmx:
      domain: &quot;com.example.myapp&quot;
</code></pre></div><h3 id="_4-2-disabling-jmx-endpoints"><a href="#_4-2-disabling-jmx-endpoints" class="header-anchor">#</a> 4.2. Disabling JMX Endpoints</h3> <p>If you do not want to expose endpoints over JMX, you can set the <code>management.endpoints.jmx.exposure.exclude</code> property to <code>*</code>, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoints.jmx.exposure.exclude=*
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoints:
    jmx:
      exposure:
        exclude: &quot;*&quot;
</code></pre></div><h3 id="_4-3-using-jolokia-for-jmx-over-http"><a href="#_4-3-using-jolokia-for-jmx-over-http" class="header-anchor">#</a> 4.3. Using Jolokia for JMX over HTTP</h3> <p>Jolokia is a JMX-HTTP bridge that provides an alternative method of accessing JMX beans.
To use Jolokia, include a dependency to <code>org.jolokia:jolokia-core</code>.
For example, with Maven, you would add the following dependency:</p> <div class="language- extra-class"><pre class="language-text"><code>&lt;dependency&gt;
    &lt;groupId&gt;org.jolokia&lt;/groupId&gt;
    &lt;artifactId&gt;jolokia-core&lt;/artifactId&gt;
&lt;/dependency&gt;
</code></pre></div><p>You can then expose the Jolokia endpoint by adding <code>jolokia</code> or <code>*</code> to the <code>management.endpoints.web.exposure.include</code> property.
You can then access it by using <code>/actuator/jolokia</code> on your management HTTP server.</p> <table><thead><tr><th></th> <th>The Jolokia endpoint exposes Jolokia’s servlet as an actuator endpoint.<br>As a result, it is specific to servlet environments, such as Spring MVC and Jersey.<br>The endpoint is not available in a WebFlux application.</th></tr></thead> <tbody></tbody></table> <h4 id="_4-3-1-customizing-jolokia"><a href="#_4-3-1-customizing-jolokia" class="header-anchor">#</a> 4.3.1. Customizing Jolokia</h4> <p>Jolokia has a number of settings that you would traditionally configure by setting servlet parameters.
With Spring Boot, you can use your <code>application.properties</code> file.
To do so, prefix the parameter with <code>management.endpoint.jolokia.config.</code>, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.jolokia.config.debug=true
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    jolokia:
      config:
        debug: true
</code></pre></div><h4 id="_4-3-2-disabling-jolokia"><a href="#_4-3-2-disabling-jolokia" class="header-anchor">#</a> 4.3.2. Disabling Jolokia</h4> <p>If you use Jolokia but do not want Spring Boot to configure it, set the <code>management.endpoint.jolokia.enabled</code> property to <code>false</code>, as follows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.endpoint.jolokia.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  endpoint:
    jolokia:
      enabled: false
</code></pre></div><h2 id="_5-loggers"><a href="#_5-loggers" class="header-anchor">#</a> 5. Loggers</h2> <p>Spring Boot Actuator includes the ability to view and configure the log levels of your application at runtime.
You can view either the entire list or an individual logger’s configuration, which is made up of both the explicitly configured logging level as well as the effective logging level given to it by the logging framework.
These levels can be one of:</p> <ul><li><p><code>TRACE</code></p></li> <li><p><code>DEBUG</code></p></li> <li><p><code>INFO</code></p></li> <li><p><code>WARN</code></p></li> <li><p><code>ERROR</code></p></li> <li><p><code>FATAL</code></p></li> <li><p><code>OFF</code></p></li> <li><p><code>null</code></p></li></ul> <p><code>null</code> indicates that there is no explicit configuration.</p> <h3 id="_5-1-configure-a-logger"><a href="#_5-1-configure-a-logger" class="header-anchor">#</a> 5.1. Configure a Logger</h3> <p>To configure a given logger, <code>POST</code> a partial entity to the resource’s URI, as the following example shows:</p> <div class="language- extra-class"><pre class="language-text"><code>{
    &quot;configuredLevel&quot;: &quot;DEBUG&quot;
}
</code></pre></div><table><thead><tr><th></th> <th>To “reset” the specific level of the logger (and use the default configuration instead), you can pass a value of <code>null</code> as the <code>configuredLevel</code>.</th></tr></thead> <tbody></tbody></table> <h2 id="_6-metrics"><a href="#_6-metrics" class="header-anchor">#</a> 6. Metrics</h2> <p>Spring Boot Actuator provides dependency management and auto-configuration for <a href="https://micrometer.io" target="_blank" rel="noopener noreferrer">Micrometer<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, an application metrics facade that supports <a href="https://micrometer.io/docs" target="_blank" rel="noopener noreferrer">numerous monitoring systems<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, including:</p> <ul><li><p><a href="#actuator.metrics.export.appoptics">AppOptics</a></p></li> <li><p><a href="#actuator.metrics.export.atlas">Atlas</a></p></li> <li><p><a href="#actuator.metrics.export.datadog">Datadog</a></p></li> <li><p><a href="#actuator.metrics.export.dynatrace">Dynatrace</a></p></li> <li><p><a href="#actuator.metrics.export.elastic">Elastic</a></p></li> <li><p><a href="#actuator.metrics.export.ganglia">Ganglia</a></p></li> <li><p><a href="#actuator.metrics.export.graphite">Graphite</a></p></li> <li><p><a href="#actuator.metrics.export.humio">Humio</a></p></li> <li><p><a href="#actuator.metrics.export.influx">Influx</a></p></li> <li><p><a href="#actuator.metrics.export.jmx">JMX</a></p></li> <li><p><a href="#actuator.metrics.export.kairos">KairosDB</a></p></li> <li><p><a href="#actuator.metrics.export.newrelic">New Relic</a></p></li> <li><p><a href="#actuator.metrics.export.prometheus">Prometheus</a></p></li> <li><p><a href="#actuator.metrics.export.signalfx">SignalFx</a></p></li> <li><p><a href="#actuator.metrics.export.simple">Simple (in-memory)</a></p></li> <li><p><a href="#actuator.metrics.export.stackdriver">Stackdriver</a></p></li> <li><p><a href="#actuator.metrics.export.statsd">StatsD</a></p></li> <li><p><a href="#actuator.metrics.export.wavefront">Wavefront</a></p></li></ul> <table><thead><tr><th></th> <th>To learn more about Micrometer’s capabilities, see its <a href="https://micrometer.io/docs" target="_blank" rel="noopener noreferrer">reference documentation<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, in particular the <a href="https://micrometer.io/docs/concepts" target="_blank" rel="noopener noreferrer">concepts section<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</th></tr></thead> <tbody></tbody></table> <h3 id="_6-1-getting-started"><a href="#_6-1-getting-started" class="header-anchor">#</a> 6.1. Getting started</h3> <p>Spring Boot auto-configures a composite <code>MeterRegistry</code> and adds a registry to the composite for each of the supported implementations that it finds on the classpath.
Having a dependency on <code>micrometer-registry-{system}</code> in your runtime classpath is enough for Spring Boot to configure the registry.</p> <p>Most registries share common features.
For instance, you can disable a particular registry even if the Micrometer registry implementation is on the classpath.
The following example disables Datadog:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.datadog.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      datadog:
        enabled: false
</code></pre></div><p>You can also disable all registries unless stated otherwise by the registry-specific property, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.defaults.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      defaults:
        enabled: false
</code></pre></div><p>Spring Boot also adds any auto-configured registries to the global static composite registry on the <code>Metrics</code> class, unless you explicitly tell it not to:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.use-global-registry=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    use-global-registry: false
</code></pre></div><p>You can register any number of <code>MeterRegistryCustomizer</code> beans to further configure the registry, such as applying common tags, before any meters are registered with the registry:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.MeterRegistry;

import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyMeterRegistryConfiguration {

    @Bean
    public MeterRegistryCustomizer&lt;MeterRegistry&gt; metricsCommonTags() {
        return (registry) -&gt; registry.config().commonTags(&quot;region&quot;, &quot;us-east-1&quot;);
    }

}

</code></pre></div><p>You can apply customizations to particular registry implementations by being more specific about the generic type:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.config.NamingConvention;
import io.micrometer.graphite.GraphiteMeterRegistry;

import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyMeterRegistryConfiguration {

    @Bean
    public MeterRegistryCustomizer&lt;GraphiteMeterRegistry&gt; graphiteMetricsNamingConvention() {
        return (registry) -&gt; registry.config().namingConvention(this::name);
    }

    private String name(String name, Meter.Type type, String baseUnit) {
        return ...
    }

}

</code></pre></div><p>Spring Boot also <a href="#actuator.metrics.supported">configures built-in instrumentation</a> that you can control through configuration or dedicated annotation markers.</p> <h3 id="_6-2-supported-monitoring-systems"><a href="#_6-2-supported-monitoring-systems" class="header-anchor">#</a> 6.2. Supported Monitoring Systems</h3> <p>This section briefly describes each of the supported monitoring systems.</p> <h4 id="_6-2-1-appoptics"><a href="#_6-2-1-appoptics" class="header-anchor">#</a> 6.2.1. AppOptics</h4> <p>By default, the AppOptics registry periodically pushes metrics to <code>[api.appoptics.com/v1/measurements](https://api.appoptics.com/v1/measurements)</code>.
To export metrics to SaaS <a href="https://micrometer.io/docs/registry/appOptics" target="_blank" rel="noopener noreferrer">AppOptics<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, your API token must be provided:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.appoptics.api-token=YOUR_TOKEN
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      appoptics:
        api-token: &quot;YOUR_TOKEN&quot;
</code></pre></div><h4 id="_6-2-2-atlas"><a href="#_6-2-2-atlas" class="header-anchor">#</a> 6.2.2. Atlas</h4> <p>By default, metrics are exported to <a href="https://micrometer.io/docs/registry/atlas" target="_blank" rel="noopener noreferrer">Atlas<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> running on your local machine.
You can provide the location of the <a href="https://github.com/Netflix/atlas" target="_blank" rel="noopener noreferrer">Atlas server<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.atlas.uri=https://atlas.example.com:7101/api/v1/publish
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      atlas:
        uri: &quot;https://atlas.example.com:7101/api/v1/publish&quot;
</code></pre></div><h4 id="_6-2-3-datadog"><a href="#_6-2-3-datadog" class="header-anchor">#</a> 6.2.3. Datadog</h4> <p>A Datadog registry periodically pushes metrics to <a href="https://www.datadoghq.com" target="_blank" rel="noopener noreferrer">datadoghq<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
To export metrics to <a href="https://micrometer.io/docs/registry/datadog" target="_blank" rel="noopener noreferrer">Datadog<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, you must provide your API key:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.datadog.api-key=YOUR_KEY
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      datadog:
        api-key: &quot;YOUR_KEY&quot;
</code></pre></div><p>You can also change the interval at which metrics are sent to Datadog:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.datadog.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      datadog:
        step: &quot;30s&quot;
</code></pre></div><h4 id="_6-2-4-dynatrace"><a href="#_6-2-4-dynatrace" class="header-anchor">#</a> 6.2.4. Dynatrace</h4> <p>Dynatrace offers two metrics ingest APIs, both of which are implemented for <a href="https://micrometer.io/docs/registry/dynatrace" target="_blank" rel="noopener noreferrer">Micrometer<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
Configuration properties in the <code>v1</code> namespace apply only when exporting to the <a href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v1/" target="_blank" rel="noopener noreferrer">Timeseries v1 API<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
Configuration properties in the <code>v2</code> namespace apply only when exporting to the <a href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/" target="_blank" rel="noopener noreferrer">Metrics v2 API<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
Note that this integration can export only to either the <code>v1</code> or <code>v2</code> version of the API at a time.
If the <code>device-id</code> (required for v1 but not used in v2) is set in the <code>v1</code> namespace, metrics are exported to the <code>v1</code> endpoint.
Otherwise, <code>v2</code> is assumed.</p> <h5 id="v2-api"><a href="#v2-api" class="header-anchor">#</a> v2 API</h5> <p>You can use the v2 API in two ways.</p> <p>If a local OneAgent is running on the host, metrics are automatically exported to the <a href="https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/ingestion-methods/local-api/" target="_blank" rel="noopener noreferrer">local OneAgent ingest endpoint<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
The ingest endpoint forwards the metrics to the Dynatrace backend.
This is the default behavior and requires no special setup beyond a dependency on <code>io.micrometer:micrometer-registry-dynatrace</code>.</p> <p>If no local OneAgent is running, the endpoint of the <a href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/" target="_blank" rel="noopener noreferrer">Metrics v2 API<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> and an API token are required.
The <a href="https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/" target="_blank" rel="noopener noreferrer">API token<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> must have the “Ingest metrics” (<code>metrics.ingest</code>) permission set.
We recommend limiting the scope of the token to this one permission.
You must ensure that the endpoint URI contains the path (for example, <code>/api/v2/metrics/ingest</code>):</p> <p>The URL of the Metrics API v2 ingest endpoint is different according to your deployment option:</p> <ul><li><p>SaaS: <code>https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest</code></p></li> <li><p>Managed deployments: <code>https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest</code></p></li></ul> <p>The example below configures metrics export using the <code>example</code> environment id:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.dynatrace.uri=https://example.live.dynatrace.com/api/v2/metrics/ingest
management.metrics.export.dynatrace.api-token=YOUR_TOKEN
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      dynatrace:
        uri: &quot;https://example.live.dynatrace.com/api/v2/metrics/ingest&quot;
        api-token: &quot;YOUR_TOKEN&quot;
</code></pre></div><p>When using the Dynatrace v2 API, the following optional features are available:</p> <ul><li><p>Metric key prefix: Sets a prefix that is prepended to all exported metric keys.</p></li> <li><p>Enrich with Dynatrace metadata: If a OneAgent or Dynatrace operator is running, enrich metrics with additional metadata (for example, about the host, process, or pod).</p></li> <li><p>Default dimensions: Specify key-value pairs that are added to all exported metrics.
If tags with the same key are specified with Micrometer, they overwrite the default dimensions.</p></li></ul> <p>It is possible to not specify a URI and API token, as shown in the following example.
In this scenario, the local OneAgent endpoint is used:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.dynatrace.v2.metric-key-prefix=your.key.prefix
management.metrics.export.dynatrace.v2.enrich-with-dynatrace-metadata=true
management.metrics.export.dynatrace.v2.default-dimensions.key1=value1
management.metrics.export.dynatrace.v2.default-dimensions.key2=value2
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      dynatrace:
        # Specify uri and api-token here if not using the local OneAgent endpoint.
        v2:
          metric-key-prefix: &quot;your.key.prefix&quot;
          enrich-with-dynatrace-metadata: true
          default-dimensions:
            key1: &quot;value1&quot;
            key2: &quot;value2&quot;
</code></pre></div><h5 id="v1-api-legacy"><a href="#v1-api-legacy" class="header-anchor">#</a> v1 API (Legacy)</h5> <p>The Dynatrace v1 API metrics registry pushes metrics to the configured URI periodically by using the <a href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v1/" target="_blank" rel="noopener noreferrer">Timeseries v1 API<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
For backwards-compatibility with existing setups, when <code>device-id</code> is set (required for v1, but not used in v2), metrics are exported to the Timeseries v1 endpoint.
To export metrics to <a href="https://micrometer.io/docs/registry/dynatrace" target="_blank" rel="noopener noreferrer">Dynatrace<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, your API token, device ID, and URI must be provided:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.dynatrace.uri=https://{your-environment-id}.live.dynatrace.com
management.metrics.export.dynatrace.api-token=YOUR_TOKEN
management.metrics.export.dynatrace.v1.device-id=YOUR_DEVICE_ID
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      dynatrace:
        uri: &quot;https://{your-environment-id}.live.dynatrace.com&quot;
        api-token: &quot;YOUR_TOKEN&quot;
        v1:
          device-id: &quot;YOUR_DEVICE_ID&quot;
</code></pre></div><p>For the v1 API, you must specify the base environment URI without a path, as the v1 endpoint path is added automatically.</p> <h5 id="version-independent-settings"><a href="#version-independent-settings" class="header-anchor">#</a> Version-independent Settings</h5> <p>In addition to the API endpoint and token, you can also change the interval at which metrics are sent to Dynatrace.
The default export interval is <code>60s</code>.
The following example sets the export interval to 30 seconds:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.dynatrace.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      dynatrace:
        step: &quot;30s&quot;
</code></pre></div><p>You can find more information on how to set up the Dynatrace exporter for Micrometer in <a href="https://micrometer.io/docs/registry/dynatrace" target="_blank" rel="noopener noreferrer">the Micrometer documentation<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <h4 id="_6-2-5-elastic"><a href="#_6-2-5-elastic" class="header-anchor">#</a> 6.2.5. Elastic</h4> <p>By default, metrics are exported to <a href="https://micrometer.io/docs/registry/elastic" target="_blank" rel="noopener noreferrer">Elastic<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> running on your local machine.
You can provide the location of the Elastic server to use by using the following property:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.elastic.host=https://elastic.example.com:8086
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      elastic:
        host: &quot;https://elastic.example.com:8086&quot;
</code></pre></div><h4 id="_6-2-6-ganglia"><a href="#_6-2-6-ganglia" class="header-anchor">#</a> 6.2.6. Ganglia</h4> <p>By default, metrics are exported to <a href="https://micrometer.io/docs/registry/ganglia" target="_blank" rel="noopener noreferrer">Ganglia<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> running on your local machine.
You can provide the <a href="http://ganglia.sourceforge.net" target="_blank" rel="noopener noreferrer">Ganglia server<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> host and port, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.ganglia.host=ganglia.example.com
management.metrics.export.ganglia.port=9649
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      ganglia:
        host: &quot;ganglia.example.com&quot;
        port: 9649
</code></pre></div><h4 id="_6-2-7-graphite"><a href="#_6-2-7-graphite" class="header-anchor">#</a> 6.2.7. Graphite</h4> <p>By default, metrics are exported to <a href="https://micrometer.io/docs/registry/graphite" target="_blank" rel="noopener noreferrer">Graphite<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> running on your local machine.
You can provide the <a href="https://graphiteapp.org" target="_blank" rel="noopener noreferrer">Graphite server<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> host and port, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.graphite.host=graphite.example.com
management.metrics.export.graphite.port=9004
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
     export:
       graphite:
         host: &quot;graphite.example.com&quot;
         port: 9004
</code></pre></div><p>Micrometer provides a default <code>HierarchicalNameMapper</code> that governs how a dimensional meter ID is <a href="https://micrometer.io/docs/registry/graphite#_hierarchical_name_mapping" target="_blank" rel="noopener noreferrer">mapped to flat hierarchical names<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <table><thead><tr><th></th> <th>To take control over this behavior, define your <code>GraphiteMeterRegistry</code> and supply your own <code>HierarchicalNameMapper</code>.<br>An auto-configured <code>GraphiteConfig</code> and <code>Clock</code> beans are provided unless you define your own:<br><br><code>&lt;br/&gt;import io.micrometer.core.instrument.Clock;&lt;br/&gt;import io.micrometer.core.instrument.Meter;&lt;br/&gt;import io.micrometer.core.instrument.config.NamingConvention;&lt;br/&gt;import io.micrometer.core.instrument.util.HierarchicalNameMapper;&lt;br/&gt;import io.micrometer.graphite.GraphiteConfig;&lt;br/&gt;import io.micrometer.graphite.GraphiteMeterRegistry;&lt;br/&gt;&lt;br/&gt;import org.springframework.context.annotation.Bean;&lt;br/&gt;import org.springframework.context.annotation.Configuration;&lt;br/&gt;&lt;br/&gt;@Configuration(proxyBeanMethods = false)&lt;br/&gt;public class MyGraphiteConfiguration {&lt;br/&gt;&lt;br/&gt; @Bean&lt;br/&gt; public GraphiteMeterRegistry graphiteMeterRegistry(GraphiteConfig config, Clock clock) {&lt;br/&gt; return new GraphiteMeterRegistry(config, clock, this::toHierarchicalName);&lt;br/&gt; }&lt;br/&gt;&lt;br/&gt; private String toHierarchicalName(Meter.Id id, NamingConvention convention) {&lt;br/&gt; return ...&lt;br/&gt; }&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;</code></th></tr></thead> <tbody></tbody></table> <h4 id="_6-2-8-humio"><a href="#_6-2-8-humio" class="header-anchor">#</a> 6.2.8. Humio</h4> <p>By default, the Humio registry periodically pushes metrics to <a href="https://cloud.humio.com" target="_blank" rel="noopener noreferrer">cloud.humio.com<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
To export metrics to SaaS <a href="https://micrometer.io/docs/registry/humio" target="_blank" rel="noopener noreferrer">Humio<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, you must provide your API token:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.humio.api-token=YOUR_TOKEN
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      humio:
        api-token: &quot;YOUR_TOKEN&quot;
</code></pre></div><p>You should also configure one or more tags to identify the data source to which metrics are pushed:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.humio.tags.alpha=a
management.metrics.export.humio.tags.bravo=b
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      humio:
        tags:
          alpha: &quot;a&quot;
          bravo: &quot;b&quot;
</code></pre></div><h4 id="_6-2-9-influx"><a href="#_6-2-9-influx" class="header-anchor">#</a> 6.2.9. Influx</h4> <p>By default, metrics are exported to an <a href="https://micrometer.io/docs/registry/influx" target="_blank" rel="noopener noreferrer">Influx<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> v1 instance running on your local machine with the default configuration.
To export metrics to InfluxDB v2, configure the <code>org</code>, <code>bucket</code>, and authentication <code>token</code> for writing metrics.
You can provide the location of the <a href="https://www.influxdata.com" target="_blank" rel="noopener noreferrer">Influx server<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> to use by using:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.influx.uri=https://influx.example.com:8086
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      influx:
        uri: &quot;https://influx.example.com:8086&quot;
</code></pre></div><h4 id="_6-2-10-jmx"><a href="#_6-2-10-jmx" class="header-anchor">#</a> 6.2.10. JMX</h4> <p>Micrometer provides a hierarchical mapping to <a href="https://micrometer.io/docs/registry/jmx" target="_blank" rel="noopener noreferrer">JMX<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, primarily as a cheap and portable way to view metrics locally.
By default, metrics are exported to the <code>metrics</code> JMX domain.
You can provide the domain to use by using:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.jmx.domain=com.example.app.metrics
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      jmx:
        domain: &quot;com.example.app.metrics&quot;
</code></pre></div><p>Micrometer provides a default <code>HierarchicalNameMapper</code> that governs how a dimensional meter ID is <a href="https://micrometer.io/docs/registry/jmx#_hierarchical_name_mapping" target="_blank" rel="noopener noreferrer">mapped to flat hierarchical names<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <table><thead><tr><th></th> <th>To take control over this behavior, define your <code>JmxMeterRegistry</code> and supply your own <code>HierarchicalNameMapper</code>.<br>An auto-configured <code>JmxConfig</code> and <code>Clock</code> beans are provided unless you define your own:<br><br><code>&lt;br/&gt;import io.micrometer.core.instrument.Clock;&lt;br/&gt;import io.micrometer.core.instrument.Meter;&lt;br/&gt;import io.micrometer.core.instrument.config.NamingConvention;&lt;br/&gt;import io.micrometer.core.instrument.util.HierarchicalNameMapper;&lt;br/&gt;import io.micrometer.jmx.JmxConfig;&lt;br/&gt;import io.micrometer.jmx.JmxMeterRegistry;&lt;br/&gt;&lt;br/&gt;import org.springframework.context.annotation.Bean;&lt;br/&gt;import org.springframework.context.annotation.Configuration;&lt;br/&gt;&lt;br/&gt;@Configuration(proxyBeanMethods = false)&lt;br/&gt;public class MyJmxConfiguration {&lt;br/&gt;&lt;br/&gt; @Bean&lt;br/&gt; public JmxMeterRegistry jmxMeterRegistry(JmxConfig config, Clock clock) {&lt;br/&gt; return new JmxMeterRegistry(config, clock, this::toHierarchicalName);&lt;br/&gt; }&lt;br/&gt;&lt;br/&gt; private String toHierarchicalName(Meter.Id id, NamingConvention convention) {&lt;br/&gt; return ...&lt;br/&gt; }&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;</code></th></tr></thead> <tbody></tbody></table> <h4 id="_6-2-11-kairosdb"><a href="#_6-2-11-kairosdb" class="header-anchor">#</a> 6.2.11. KairosDB</h4> <p>By default, metrics are exported to <a href="https://micrometer.io/docs/registry/kairos" target="_blank" rel="noopener noreferrer">KairosDB<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> running on your local machine.
You can provide the location of the <a href="https://kairosdb.github.io/" target="_blank" rel="noopener noreferrer">KairosDB server<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> to use by using:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.kairos.uri=https://kairosdb.example.com:8080/api/v1/datapoints
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      kairos:
        uri: &quot;https://kairosdb.example.com:8080/api/v1/datapoints&quot;
</code></pre></div><h4 id="_6-2-12-new-relic"><a href="#_6-2-12-new-relic" class="header-anchor">#</a> 6.2.12. New Relic</h4> <p>A New Relic registry periodically pushes metrics to <a href="https://micrometer.io/docs/registry/new-relic" target="_blank" rel="noopener noreferrer">New Relic<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
To export metrics to <a href="https://newrelic.com" target="_blank" rel="noopener noreferrer">New Relic<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, you must provide your API key and account ID:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.newrelic.api-key=YOUR_KEY
management.metrics.export.newrelic.account-id=YOUR_ACCOUNT_ID
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      newrelic:
        api-key: &quot;YOUR_KEY&quot;
        account-id: &quot;YOUR_ACCOUNT_ID&quot;
</code></pre></div><p>You can also change the interval at which metrics are sent to New Relic:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.newrelic.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      newrelic:
        step: &quot;30s&quot;
</code></pre></div><p>By default, metrics are published through REST calls, but you can also use the Java Agent API if you have it on the classpath:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.newrelic.client-provider-type=insights-agent
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      newrelic:
        client-provider-type: &quot;insights-agent&quot;
</code></pre></div><p>Finally, you can take full control by defining your own <code>NewRelicClientProvider</code> bean.</p> <h4 id="_6-2-13-prometheus"><a href="#_6-2-13-prometheus" class="header-anchor">#</a> 6.2.13. Prometheus</h4> <p><a href="https://micrometer.io/docs/registry/prometheus" target="_blank" rel="noopener noreferrer">Prometheus<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> expects to scrape or poll individual application instances for metrics.
Spring Boot provides an actuator endpoint at <code>/actuator/prometheus</code> to present a <a href="https://prometheus.io" target="_blank" rel="noopener noreferrer">Prometheus scrape<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> with the appropriate format.</p> <table><thead><tr><th></th> <th>By default, the endpoint is not available and must be exposed. See <a href="#actuator.endpoints.exposing">exposing endpoints</a> for more details.</th></tr></thead> <tbody></tbody></table> <p>The following example <code>scrape_config</code> adds to <code>prometheus.yml</code>:</p> <div class="language- extra-class"><pre class="language-text"><code>scrape_configs:
  - job_name: &quot;spring&quot;
    metrics_path: &quot;/actuator/prometheus&quot;
    static_configs:
      - targets: [&quot;HOST:PORT&quot;]
</code></pre></div><p>For ephemeral or batch jobs that may not exist long enough to be scraped, you can use <a href="https://github.com/prometheus/pushgateway" target="_blank" rel="noopener noreferrer">Prometheus Pushgateway<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> support to expose the metrics to Prometheus.
To enable Prometheus Pushgateway support, add the following dependency to your project:</p> <div class="language- extra-class"><pre class="language-text"><code>&lt;dependency&gt;
    &lt;groupId&gt;io.prometheus&lt;/groupId&gt;
    &lt;artifactId&gt;simpleclient_pushgateway&lt;/artifactId&gt;
&lt;/dependency&gt;
</code></pre></div><p>When the Prometheus Pushgateway dependency is present on the classpath and the <code>management.metrics.export.prometheus.pushgateway.enabled</code> property is set to <code>true</code>, a <code>PrometheusPushGatewayManager</code> bean is auto-configured.
This manages the pushing of metrics to a Prometheus Pushgateway.</p> <p>You can tune the <code>PrometheusPushGatewayManager</code> by using properties under <code>management.metrics.export.prometheus.pushgateway</code>.
For advanced configuration, you can also provide your own <code>PrometheusPushGatewayManager</code> bean.</p> <h4 id="_6-2-14-signalfx"><a href="#_6-2-14-signalfx" class="header-anchor">#</a> 6.2.14. SignalFx</h4> <p>SignalFx registry periodically pushes metrics to <a href="https://micrometer.io/docs/registry/signalFx" target="_blank" rel="noopener noreferrer">SignalFx<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
To export metrics to <a href="https://www.signalfx.com" target="_blank" rel="noopener noreferrer">SignalFx<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, you must provide your access token:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.signalfx.access-token=YOUR_ACCESS_TOKEN
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      signalfx:
        access-token: &quot;YOUR_ACCESS_TOKEN&quot;
</code></pre></div><p>You can also change the interval at which metrics are sent to SignalFx:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.signalfx.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      signalfx:
        step: &quot;30s&quot;
</code></pre></div><h4 id="_6-2-15-simple"><a href="#_6-2-15-simple" class="header-anchor">#</a> 6.2.15. Simple</h4> <p>Micrometer ships with a simple, in-memory backend that is automatically used as a fallback if no other registry is configured.
This lets you see what metrics are collected in the <a href="#actuator.metrics.endpoint">metrics endpoint</a>.</p> <p>The in-memory backend disables itself as soon as you use any other available backend.
You can also disable it explicitly:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.simple.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      simple:
        enabled: false
</code></pre></div><h4 id="_6-2-16-stackdriver"><a href="#_6-2-16-stackdriver" class="header-anchor">#</a> 6.2.16. Stackdriver</h4> <p>The Stackdriver registry periodically pushes metrics to <a href="https://cloud.google.com/stackdriver/" target="_blank" rel="noopener noreferrer">Stackdriver<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
To export metrics to SaaS <a href="https://micrometer.io/docs/registry/stackdriver" target="_blank" rel="noopener noreferrer">Stackdriver<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, you must provide your Google Cloud project ID:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.stackdriver.project-id=my-project
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      stackdriver:
        project-id: &quot;my-project&quot;
</code></pre></div><p>You can also change the interval at which metrics are sent to Stackdriver:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.stackdriver.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      stackdriver:
        step: &quot;30s&quot;
</code></pre></div><h4 id="_6-2-17-statsd"><a href="#_6-2-17-statsd" class="header-anchor">#</a> 6.2.17. StatsD</h4> <p>The StatsD registry eagerly pushes metrics over UDP to a StatsD agent.
By default, metrics are exported to a <a href="https://micrometer.io/docs/registry/statsD" target="_blank" rel="noopener noreferrer">StatsD<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> agent running on your local machine.
You can provide the StatsD agent host, port, and protocol to use by using:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.statsd.host=statsd.example.com
management.metrics.export.statsd.port=9125
management.metrics.export.statsd.protocol=udp
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      statsd:
        host: &quot;statsd.example.com&quot;
        port: 9125
        protocol: &quot;udp&quot;
</code></pre></div><p>You can also change the StatsD line protocol to use (it defaults to Datadog):</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.statsd.flavor=etsy
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      statsd:
        flavor: &quot;etsy&quot;
</code></pre></div><h4 id="_6-2-18-wavefront"><a href="#_6-2-18-wavefront" class="header-anchor">#</a> 6.2.18. Wavefront</h4> <p>The Wavefront registry periodically pushes metrics to <a href="https://micrometer.io/docs/registry/wavefront" target="_blank" rel="noopener noreferrer">Wavefront<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.
If you are exporting metrics to <a href="https://www.wavefront.com/" target="_blank" rel="noopener noreferrer">Wavefront<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> directly, you must provide your API token:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.wavefront.api-token=YOUR_API_TOKEN
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      wavefront:
        api-token: &quot;YOUR_API_TOKEN&quot;
</code></pre></div><p>Alternatively, you can use a Wavefront sidecar or an internal proxy in your environment to forward metrics data to the Wavefront API host:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.wavefront.uri=proxy://localhost:2878
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      wavefront:
        uri: &quot;proxy://localhost:2878&quot;
</code></pre></div><table><thead><tr><th></th> <th>If you publish metrics to a Wavefront proxy (as described in <a href="https://docs.wavefront.com/proxies_installing.html" target="_blank" rel="noopener noreferrer">the Wavefront documentation<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>), the host must be in the <code>proxy://HOST:PORT</code> format.</th></tr></thead> <tbody></tbody></table> <p>You can also change the interval at which metrics are sent to Wavefront:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.export.wavefront.step=30s
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    export:
      wavefront:
        step: &quot;30s&quot;
</code></pre></div><h3 id="_6-3-supported-metrics-and-meters"><a href="#_6-3-supported-metrics-and-meters" class="header-anchor">#</a> 6.3. Supported Metrics and Meters</h3> <p>Spring Boot provides automatic meter registration for a wide variety of technologies.
In most situations, the defaults provide sensible metrics that can be published to any of the supported monitoring systems.</p> <h4 id="_6-3-1-jvm-metrics"><a href="#_6-3-1-jvm-metrics" class="header-anchor">#</a> 6.3.1. JVM Metrics</h4> <p>Auto-configuration enables JVM Metrics by using core Micrometer classes.
JVM metrics are published under the <code>jvm.</code> meter name.</p> <p>The following JVM metrics are provided:</p> <ul><li><p>Various memory and buffer pool details</p></li> <li><p>Statistics related to garbage collection</p></li> <li><p>Thread utilization</p></li> <li><p>The number of classes loaded and unloaded</p></li></ul> <h4 id="_6-3-2-system-metrics"><a href="#_6-3-2-system-metrics" class="header-anchor">#</a> 6.3.2. System Metrics</h4> <p>Auto-configuration enables system metrics by using core Micrometer classes.
System metrics are published under the <code>system.</code>, <code>process.</code>, and <code>disk.</code> meter names.</p> <p>The following system metrics are provided:</p> <ul><li><p>CPU metrics</p></li> <li><p>File descriptor metrics</p></li> <li><p>Uptime metrics (both the amount of time the application has been running and a fixed gauge of the absolute start time)</p></li> <li><p>Disk space available</p></li></ul> <h4 id="_6-3-3-application-startup-metrics"><a href="#_6-3-3-application-startup-metrics" class="header-anchor">#</a> 6.3.3. Application Startup Metrics</h4> <p>Auto-configuration exposes application startup time metrics:</p> <ul><li><p><code>application.started.time</code>: time taken to start the application.</p></li> <li><p><code>application.ready.time</code>: time taken for the application to be ready to service requests.</p></li></ul> <p>Metrics are tagged by the fully qualified name of the application class.</p> <h4 id="_6-3-4-logger-metrics"><a href="#_6-3-4-logger-metrics" class="header-anchor">#</a> 6.3.4. Logger Metrics</h4> <p>Auto-configuration enables the event metrics for both Logback and Log4J2.
The details are published under the <code>log4j2.events.</code> or <code>logback.events.</code> meter names.</p> <h4 id="_6-3-5-task-execution-and-scheduling-metrics"><a href="#_6-3-5-task-execution-and-scheduling-metrics" class="header-anchor">#</a> 6.3.5. Task Execution and Scheduling Metrics</h4> <p>Auto-configuration enables the instrumentation of all available <code>ThreadPoolTaskExecutor</code> and <code>ThreadPoolTaskScheduler</code> beans, as long as the underling <code>ThreadPoolExecutor</code> is available.
Metrics are tagged by the name of the executor, which is derived from the bean name.</p> <h4 id="_6-3-6-spring-mvc-metrics"><a href="#_6-3-6-spring-mvc-metrics" class="header-anchor">#</a> 6.3.6. Spring MVC Metrics</h4> <p>Auto-configuration enables the instrumentation of all requests handled by Spring MVC controllers and functional handlers.
By default, metrics are generated with the name, <code>http.server.requests</code>.
You can customized the name by setting the <code>management.metrics.web.server.request.metric-name</code> property.</p> <p><code>@Timed</code> annotations are supported on <code>@Controller</code> classes and <code>@RequestMapping</code> methods (see <a href="#actuator.metrics.supported.timed-annotation">@Timed Annotation Support</a> for details).
If you do not want to record metrics for all Spring MVC requests, you can set <code>management.metrics.web.server.request.autotime.enabled</code> to <code>false</code> and exclusively use <code>@Timed</code> annotations instead.</p> <p>By default, Spring MVC related metrics are tagged with the following information:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>exception</code></td> <td>The simple class name of any exception that was thrown while handling the request.</td></tr> <tr><td><code>method</code></td> <td>The request’s method (for example, <code>GET</code> or <code>POST</code>)</td></tr> <tr><td><code>outcome</code></td> <td>The request’s outcome, based on the status code of the response.<br>1xx is <code>INFORMATIONAL</code>, 2xx is <code>SUCCESS</code>, 3xx is <code>REDIRECTION</code>, 4xx is <code>CLIENT_ERROR</code>, and 5xx is <code>SERVER_ERROR</code></td></tr> <tr><td><code>status</code></td> <td>The response’s HTTP status code (for example, <code>200</code> or <code>500</code>)</td></tr> <tr><td><code>uri</code></td> <td>The request’s URI template prior to variable substitution, if possible (for example, <code>/api/person/{id}</code>)</td></tr></tbody></table> <p>To add to the default tags, provide one or more <code>@Bean</code>s that implement <code>WebMvcTagsContributor</code>.
To replace the default tags, provide a <code>@Bean</code> that implements <code>WebMvcTagsProvider</code>.</p> <table><thead><tr><th></th> <th>In some cases, exceptions handled in web controllers are not recorded as request metrics tags.<br>Applications can opt in and record exceptions by <a href="/en/spring-boot/web.html#web.servlet.spring-mvc.error-handling">setting handled exceptions as request attributes</a>.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-3-7-spring-webflux-metrics"><a href="#_6-3-7-spring-webflux-metrics" class="header-anchor">#</a> 6.3.7. Spring WebFlux Metrics</h4> <p>Auto-configuration enables the instrumentation of all requests handled by Spring WebFlux controllers and functional handlers.
By default, metrics are generated with the name, <code>http.server.requests</code>.
You can customize the name by setting the <code>management.metrics.web.server.request.metric-name</code> property.</p> <p><code>@Timed</code> annotations are supported on <code>@Controller</code> classes and <code>@RequestMapping</code> methods (see <a href="#actuator.metrics.supported.timed-annotation">@Timed Annotation Support</a> for details).
If you do not want to record metrics for all Spring WebFlux requests, you can set <code>management.metrics.web.server.request.autotime.enabled</code> to <code>false</code> and exclusively use <code>@Timed</code> annotations instead.</p> <p>By default, WebFlux related metrics are tagged with the following information:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>exception</code></td> <td>The simple class name of any exception that was thrown while handling the request.</td></tr> <tr><td><code>method</code></td> <td>The request’s method (for example, <code>GET</code> or <code>POST</code>)</td></tr> <tr><td><code>outcome</code></td> <td>The request’s outcome, based on the status code of the response.<br>1xx is <code>INFORMATIONAL</code>, 2xx is <code>SUCCESS</code>, 3xx is <code>REDIRECTION</code>, 4xx is <code>CLIENT_ERROR</code>, and 5xx is <code>SERVER_ERROR</code></td></tr> <tr><td><code>status</code></td> <td>The response’s HTTP status code (for example, <code>200</code> or <code>500</code>)</td></tr> <tr><td><code>uri</code></td> <td>The request’s URI template prior to variable substitution, if possible (for example, <code>/api/person/{id}</code>)</td></tr></tbody></table> <p>To add to the default tags, provide one or more beans that implement <code>WebFluxTagsContributor</code>.
To replace the default tags, provide a bean that implements <code>WebFluxTagsProvider</code>.</p> <table><thead><tr><th></th> <th>In some cases, exceptions handled in controllers and handler functions are not recorded as request metrics tags.<br>Applications can opt in and record exceptions by <a href="/en/spring-boot/web.html#web.reactive.webflux.error-handling">setting handled exceptions as request attributes</a>.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-3-8-jersey-server-metrics"><a href="#_6-3-8-jersey-server-metrics" class="header-anchor">#</a> 6.3.8. Jersey Server Metrics</h4> <p>Auto-configuration enables the instrumentation of all requests handled by the Jersey JAX-RS implementation.
By default, metrics are generated with the name, <code>http.server.requests</code>.
You can customize the name by setting the <code>management.metrics.web.server.request.metric-name</code> property.</p> <p><code>@Timed</code> annotations are supported on request-handling classes and methods (see <a href="#actuator.metrics.supported.timed-annotation">@Timed Annotation Support</a> for details).
If you do not want to record metrics for all Jersey requests, you can set <code>management.metrics.web.server.request.autotime.enabled</code> to <code>false</code> and exclusively use <code>@Timed</code> annotations instead.</p> <p>By default, Jersey server metrics are tagged with the following information:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>exception</code></td> <td>The simple class name of any exception that was thrown while handling the request.</td></tr> <tr><td><code>method</code></td> <td>The request’s method (for example, <code>GET</code> or <code>POST</code>)</td></tr> <tr><td><code>outcome</code></td> <td>The request’s outcome, based on the status code of the response.<br>1xx is <code>INFORMATIONAL</code>, 2xx is <code>SUCCESS</code>, 3xx is <code>REDIRECTION</code>, 4xx is <code>CLIENT_ERROR</code>, and 5xx is <code>SERVER_ERROR</code></td></tr> <tr><td><code>status</code></td> <td>The response’s HTTP status code (for example, <code>200</code> or <code>500</code>)</td></tr> <tr><td><code>uri</code></td> <td>The request’s URI template prior to variable substitution, if possible (for example, <code>/api/person/{id}</code>)</td></tr></tbody></table> <p>To customize the tags, provide a <code>@Bean</code> that implements <code>JerseyTagsProvider</code>.</p> <h4 id="_6-3-9-http-client-metrics"><a href="#_6-3-9-http-client-metrics" class="header-anchor">#</a> 6.3.9. HTTP Client Metrics</h4> <p>Spring Boot Actuator manages the instrumentation of both <code>RestTemplate</code> and <code>WebClient</code>.
For that, you have to inject the auto-configured builder and use it to create instances:</p> <ul><li><p><code>RestTemplateBuilder</code> for <code>RestTemplate</code></p></li> <li><p><code>WebClient.Builder</code> for <code>WebClient</code></p></li></ul> <p>You can also manually apply the customizers responsible for this instrumentation, namely <code>MetricsRestTemplateCustomizer</code> and <code>MetricsWebClientCustomizer</code>.</p> <p>By default, metrics are generated with the name, <code>http.client.requests</code>.
You can customize the name by setting the <code>management.metrics.web.client.request.metric-name</code> property.</p> <p>By default, metrics generated by an instrumented client are tagged with the following information:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>clientName</code></td> <td>The host portion of the URI</td></tr> <tr><td><code>method</code></td> <td>The request’s method (for example, <code>GET</code> or <code>POST</code>)</td></tr> <tr><td><code>outcome</code></td> <td>The request’s outcome, based on the status code of the response.<br>1xx is <code>INFORMATIONAL</code>, 2xx is <code>SUCCESS</code>, 3xx is <code>REDIRECTION</code>, 4xx is <code>CLIENT_ERROR</code>, and 5xx is <code>SERVER_ERROR</code>. Otherwise, it is <code>UNKNOWN</code>.</td></tr> <tr><td><code>status</code></td> <td>The response’s HTTP status code if available (for example, <code>200</code> or <code>500</code>) or <code>IO_ERROR</code> in case of I/O issues. Otherwise, it is <code>CLIENT_ERROR</code>.</td></tr> <tr><td><code>uri</code></td> <td>The request’s URI template prior to variable substitution, if possible (for example, <code>/api/person/{id}</code>)</td></tr></tbody></table> <p>To customize the tags, and depending on your choice of client, you can provide a <code>@Bean</code> that implements <code>RestTemplateExchangeTagsProvider</code> or <code>WebClientExchangeTagsProvider</code>.
There are convenience static functions in <code>RestTemplateExchangeTags</code> and <code>WebClientExchangeTags</code>.</p> <h4 id="_6-3-10-tomcat-metrics"><a href="#_6-3-10-tomcat-metrics" class="header-anchor">#</a> 6.3.10. Tomcat Metrics</h4> <p>Auto-configuration enables the instrumentation of Tomcat only when an <code>MBeanRegistry</code> is enabled.
By default, the <code>MBeanRegistry</code> is disabled, but you can enable it by setting <code>server.tomcat.mbeanregistry.enabled</code> to <code>true</code>.</p> <p>Tomcat metrics are published under the <code>tomcat.</code> meter name.</p> <h4 id="_6-3-11-cache-metrics"><a href="#_6-3-11-cache-metrics" class="header-anchor">#</a> 6.3.11. Cache Metrics</h4> <p>Auto-configuration enables the instrumentation of all available <code>Cache</code> instances on startup, with metrics prefixed with <code>cache</code>.
Cache instrumentation is standardized for a basic set of metrics.
Additional, cache-specific metrics are also available.</p> <p>The following cache libraries are supported:</p> <ul><li><p>Caffeine</p></li> <li><p>EhCache 2</p></li> <li><p>Hazelcast</p></li> <li><p>Any compliant JCache (JSR-107) implementation</p></li> <li><p>Redis</p></li></ul> <p>Metrics are tagged by the name of the cache and by the name of the <code>CacheManager</code>, which is derived from the bean name.</p> <table><thead><tr><th></th> <th>Only caches that are configured on startup are bound to the registry.<br>For caches not defined in the cache’s configuration, such as caches created on the fly or programmatically after the startup phase, an explicit registration is required.<br>A <code>CacheMetricsRegistrar</code> bean is made available to make that process easier.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-3-12-datasource-metrics"><a href="#_6-3-12-datasource-metrics" class="header-anchor">#</a> 6.3.12. DataSource Metrics</h4> <p>Auto-configuration enables the instrumentation of all available <code>DataSource</code> objects with metrics prefixed with <code>jdbc.connections</code>.
Data source instrumentation results in gauges that represent the currently active, idle, maximum allowed, and minimum allowed connections in the pool.</p> <p>Metrics are also tagged by the name of the <code>DataSource</code> computed based on the bean name.</p> <table><thead><tr><th></th> <th>By default, Spring Boot provides metadata for all supported data sources.<br>You can add additional <code>DataSourcePoolMetadataProvider</code> beans if your favorite data source is not supported.<br>See <code>DataSourcePoolMetadataProvidersConfiguration</code> for examples.</th></tr></thead> <tbody></tbody></table> <p>Also, Hikari-specific metrics are exposed with a <code>hikaricp</code> prefix.
Each metric is tagged by the name of the pool (you can control it with <code>spring.datasource.name</code>).</p> <h4 id="_6-3-13-hibernate-metrics"><a href="#_6-3-13-hibernate-metrics" class="header-anchor">#</a> 6.3.13. Hibernate Metrics</h4> <p>If <code>org.hibernate:hibernate-micrometer</code> is on the classpath, all available Hibernate <code>EntityManagerFactory</code> instances that have statistics enabled are instrumented with a metric named <code>hibernate</code>.</p> <p>Metrics are also tagged by the name of the <code>EntityManagerFactory</code>, which is derived from the bean name.</p> <p>To enable statistics, the standard JPA property <code>hibernate.generate_statistics</code> must be set to <code>true</code>.
You can enable that on the auto-configured <code>EntityManagerFactory</code>:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>spring.jpa.properties[hibernate.generate_statistics]=true
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>spring:
  jpa:
    properties:
      &quot;[hibernate.generate_statistics]&quot;: true
</code></pre></div><h4 id="_6-3-14-spring-data-repository-metrics"><a href="#_6-3-14-spring-data-repository-metrics" class="header-anchor">#</a> 6.3.14. Spring Data Repository Metrics</h4> <p>Auto-configuration enables the instrumentation of all Spring Data <code>Repository</code> method invocations.
By default, metrics are generated with the name, <code>spring.data.repository.invocations</code>.
You can customize the name by setting the <code>management.metrics.data.repository.metric-name</code> property.</p> <p><code>@Timed</code> annotations are supported on <code>Repository</code> classes and methods (see <a href="#actuator.metrics.supported.timed-annotation">@Timed Annotation Support</a> for details).
If you do not want to record metrics for all <code>Repository</code> invocations, you can set <code>management.metrics.data.repository.autotime.enabled</code> to <code>false</code> and exclusively use <code>@Timed</code> annotations instead.</p> <p>By default, repository invocation related metrics are tagged with the following information:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>repository</code></td> <td>The simple class name of the source <code>Repository</code>.</td></tr> <tr><td><code>method</code></td> <td>The name of the <code>Repository</code> method that was invoked.</td></tr> <tr><td><code>state</code></td> <td>The result state (<code>SUCCESS</code>, <code>ERROR</code>, <code>CANCELED</code>, or <code>RUNNING</code>).</td></tr> <tr><td><code>exception</code></td> <td>The simple class name of any exception that was thrown from the invocation.</td></tr></tbody></table> <p>To replace the default tags, provide a <code>@Bean</code> that implements <code>RepositoryTagsProvider</code>.</p> <h4 id="_6-3-15-rabbitmq-metrics"><a href="#_6-3-15-rabbitmq-metrics" class="header-anchor">#</a> 6.3.15. RabbitMQ Metrics</h4> <p>Auto-configuration enables the instrumentation of all available RabbitMQ connection factories with a metric named <code>rabbitmq</code>.</p> <h4 id="_6-3-16-spring-integration-metrics"><a href="#_6-3-16-spring-integration-metrics" class="header-anchor">#</a> 6.3.16. Spring Integration Metrics</h4> <p>Spring Integration automatically provides <a href="https://docs.spring.io/spring-integration/docs/5.5.9/reference/html/system-management.html#micrometer-integration" target="_blank" rel="noopener noreferrer">Micrometer support<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> whenever a <code>MeterRegistry</code> bean is available.
Metrics are published under the <code>spring.integration.</code> meter name.</p> <h4 id="_6-3-17-kafka-metrics"><a href="#_6-3-17-kafka-metrics" class="header-anchor">#</a> 6.3.17. Kafka Metrics</h4> <p>Auto-configuration registers a <code>MicrometerConsumerListener</code> and <code>MicrometerProducerListener</code> for the auto-configured consumer factory and producer factory, respectively.
It also registers a <code>KafkaStreamsMicrometerListener</code> for <code>StreamsBuilderFactoryBean</code>.
For more detail, see the <a href="https://docs.spring.io/spring-kafka/docs/2.8.3/reference/html/#micrometer-native" target="_blank" rel="noopener noreferrer">Micrometer Native Metrics<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> section of the Spring Kafka documentation.</p> <h4 id="_6-3-18-mongodb-metrics"><a href="#_6-3-18-mongodb-metrics" class="header-anchor">#</a> 6.3.18. MongoDB Metrics</h4> <p>This section briefly describes the available metrics for MongoDB.</p> <h5 id="mongodb-command-metrics"><a href="#mongodb-command-metrics" class="header-anchor">#</a> MongoDB Command Metrics</h5> <p>Auto-configuration registers a <code>MongoMetricsCommandListener</code> with the auto-configured <code>MongoClient</code>.</p> <p>A timer metric named <code>mongodb.driver.commands</code> is created for each command issued to the underlying MongoDB driver.
Each metric is tagged with the following information by default:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>command</code></td> <td>The name of the command issued.</td></tr> <tr><td><code>cluster.id</code></td> <td>The identifier of the cluster to which the command was sent.</td></tr> <tr><td><code>server.address</code></td> <td>The address of the server to which the command was sent.</td></tr> <tr><td><code>status</code></td> <td>The outcome of the command (<code>SUCCESS</code> or <code>FAILED</code>).</td></tr></tbody></table> <p>To replace the default metric tags, define a <code>MongoCommandTagsProvider</code> bean, as the following example shows:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyCommandTagsProviderConfiguration {

    @Bean
    public MongoCommandTagsProvider customCommandTagsProvider() {
        return new CustomCommandTagsProvider();
    }

}

</code></pre></div><p>To disable the auto-configured command metrics, set the following property:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.mongo.command.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    mongo:
      command:
        enabled: false
</code></pre></div><h5 id="mongodb-connection-pool-metrics"><a href="#mongodb-connection-pool-metrics" class="header-anchor">#</a> MongoDB Connection Pool Metrics</h5> <p>Auto-configuration registers a <code>MongoMetricsConnectionPoolListener</code> with the auto-configured <code>MongoClient</code>.</p> <p>The following gauge metrics are created for the connection pool:</p> <ul><li><p><code>mongodb.driver.pool.size</code> reports the current size of the connection pool, including idle and and in-use members.</p></li> <li><p><code>mongodb.driver.pool.checkedout</code> reports the count of connections that are currently in use.</p></li> <li><p><code>mongodb.driver.pool.waitqueuesize</code> reports the current size of the wait queue for a connection from the pool.</p></li></ul> <p>Each metric is tagged with the following information by default:</p> <table><thead><tr><th>Tag</th> <th>Description</th></tr></thead> <tbody><tr><td><code>cluster.id</code></td> <td>The identifier of the cluster to which the connection pool corresponds.</td></tr> <tr><td><code>server.address</code></td> <td>The address of the server to which the connection pool corresponds.</td></tr></tbody></table> <p>To replace the default metric tags, define a <code>MongoConnectionPoolTagsProvider</code> bean:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyConnectionPoolTagsProviderConfiguration {

    @Bean
    public MongoConnectionPoolTagsProvider customConnectionPoolTagsProvider() {
        return new CustomConnectionPoolTagsProvider();
    }

}

</code></pre></div><p>To disable the auto-configured connection pool metrics, set the following property:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.mongo.connectionpool.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    mongo:
      connectionpool:
        enabled: false
</code></pre></div><h4 id="_6-3-19-jetty-metrics"><a href="#_6-3-19-jetty-metrics" class="header-anchor">#</a> 6.3.19. Jetty Metrics</h4> <p>Auto-configuration binds metrics for Jetty’s <code>ThreadPool</code> by using Micrometer’s <code>JettyServerThreadPoolMetrics</code>.
Metrics for Jetty’s <code>Connector</code> instances are bound by using Micrometer’s <code>JettyConnectionMetrics</code> and, when <code>server.ssl.enabled</code> is set to <code>true</code>, Micrometer’s <code>JettySslHandshakeMetrics</code>.</p> <h4 id="_6-3-20-timed-annotation-support"><a href="#_6-3-20-timed-annotation-support" class="header-anchor">#</a> 6.3.20. @Timed Annotation Support</h4> <p>You can use the <code>@Timed</code> annotation from the <code>io.micrometer.core.annotation</code> package with several of the supported technologies described earlier.
If supported, you can use the annotation at either the class level or the method level.</p> <p>For example, the following code shows how you can use the annotation to instrument all request mappings in a <code>@RestController</code>:</p> <div class="language- extra-class"><pre class="language-text"><code>import java.util.List;

import io.micrometer.core.annotation.Timed;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Timed
public class MyController {

    @GetMapping(&quot;/api/addresses&quot;)
    public List&lt;Address&gt; listAddress() {
        return ...
    }

    @GetMapping(&quot;/api/people&quot;)
    public List&lt;Person&gt; listPeople() {
        return ...
    }

}

</code></pre></div><p>If you want only to instrument a single mapping, you can use the annotation on the method instead of the class:</p> <div class="language- extra-class"><pre class="language-text"><code>import java.util.List;

import io.micrometer.core.annotation.Timed;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {

    @GetMapping(&quot;/api/addresses&quot;)
    public List&lt;Address&gt; listAddress() {
        return ...
    }

    @GetMapping(&quot;/api/people&quot;)
    @Timed
    public List&lt;Person&gt; listPeople() {
        return ...
    }

}

</code></pre></div><p>You can also combine class-level and method-level annotations if you want to change the timing details for a specific method:</p> <div class="language- extra-class"><pre class="language-text"><code>import java.util.List;

import io.micrometer.core.annotation.Timed;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Timed
public class MyController {

    @GetMapping(&quot;/api/addresses&quot;)
    public List&lt;Address&gt; listAddress() {
        return ...
    }

    @GetMapping(&quot;/api/people&quot;)
    @Timed(extraTags = { &quot;region&quot;, &quot;us-east-1&quot; })
    @Timed(value = &quot;all.people&quot;, longTask = true)
    public List&lt;Person&gt; listPeople() {
        return ...
    }

}

</code></pre></div><table><thead><tr><th></th> <th>A <code>@Timed</code> annotation with <code>longTask = true</code> enables a long task timer for the method.<br>Long task timers require a separate metric name and can be stacked with a short task timer.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-3-21-redis-metrics"><a href="#_6-3-21-redis-metrics" class="header-anchor">#</a> 6.3.21. Redis Metrics</h4> <p>Auto-configuration registers a <code>MicrometerCommandLatencyRecorder</code> for the auto-configured <code>LettuceConnectionFactory</code>.
For more detail, see the <a href="https://lettuce.io/core/6.1.6.RELEASE/reference/index.html#command.latency.metrics.micrometer" target="_blank" rel="noopener noreferrer">Micrometer Metrics section<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> of the Lettuce documentation.</p> <h3 id="_6-4-registering-custom-metrics"><a href="#_6-4-registering-custom-metrics" class="header-anchor">#</a> 6.4. Registering Custom Metrics</h3> <p>To register custom metrics, inject <code>MeterRegistry</code> into your component:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Tags;

import org.springframework.stereotype.Component;

@Component
public class MyBean {

    private final Dictionary dictionary;

    public MyBean(MeterRegistry registry) {
        this.dictionary = Dictionary.load();
        registry.gauge(&quot;dictionary.size&quot;, Tags.empty(), this.dictionary.getWords().size());
    }

}

</code></pre></div><p>If your metrics depend on other beans, we recommend that you use a <code>MeterBinder</code> to register them:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.binder.MeterBinder;

import org.springframework.context.annotation.Bean;

public class MyMeterBinderConfiguration {

    @Bean
    public MeterBinder queueSize(Queue queue) {
        return (registry) -&gt; Gauge.builder(&quot;queueSize&quot;, queue::size).register(registry);
    }

}

</code></pre></div><p>Using a <code>MeterBinder</code> ensures that the correct dependency relationships are set up and that the bean is available when the metric’s value is retrieved.
A <code>MeterBinder</code> implementation can also be useful if you find that you repeatedly instrument a suite of metrics across components or applications.</p> <table><thead><tr><th></th> <th>By default, metrics from all <code>MeterBinder</code> beans are automatically bound to the Spring-managed <code>MeterRegistry</code>.</th></tr></thead> <tbody></tbody></table> <h3 id="_6-5-customizing-individual-metrics"><a href="#_6-5-customizing-individual-metrics" class="header-anchor">#</a> 6.5. Customizing Individual Metrics</h3> <p>If you need to apply customizations to specific <code>Meter</code> instances, you can use the <code>io.micrometer.core.instrument.config.MeterFilter</code> interface.</p> <p>For example, if you want to rename the <code>mytag.region</code> tag to <code>mytag.area</code> for all meter IDs beginning with <code>com.example</code>, you can do the following:</p> <div class="language- extra-class"><pre class="language-text"><code>import io.micrometer.core.instrument.config.MeterFilter;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyMetricsFilterConfiguration {

    @Bean
    public MeterFilter renameRegionTagMeterFilter() {
        return MeterFilter.renameTag(&quot;com.example&quot;, &quot;mytag.region&quot;, &quot;mytag.area&quot;);
    }

}

</code></pre></div><table><thead><tr><th></th> <th>By default, all <code>MeterFilter</code> beans are automatically bound to the Spring-managed <code>MeterRegistry</code>.<br>Make sure to register your metrics by using the Spring-managed <code>MeterRegistry</code> and not any of the static methods on <code>Metrics</code>.<br>These use the global registry that is not Spring-managed.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-5-1-common-tags"><a href="#_6-5-1-common-tags" class="header-anchor">#</a> 6.5.1. Common Tags</h4> <p>Common tags are generally used for dimensional drill-down on the operating environment, such as host, instance, region, stack, and others.
Commons tags are applied to all meters and can be configured, as the following example shows:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.tags.region=us-east-1
management.metrics.tags.stack=prod
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    tags:
      region: &quot;us-east-1&quot;
      stack: &quot;prod&quot;
</code></pre></div><p>The preceding example adds <code>region</code> and <code>stack</code> tags to all meters with a value of <code>us-east-1</code> and <code>prod</code>, respectively.</p> <table><thead><tr><th></th> <th>The order of common tags is important if you use Graphite.<br>As the order of common tags cannot be guaranteed by using this approach, Graphite users are advised to define a custom <code>MeterFilter</code> instead.</th></tr></thead> <tbody></tbody></table> <h4 id="_6-5-2-per-meter-properties"><a href="#_6-5-2-per-meter-properties" class="header-anchor">#</a> 6.5.2. Per-meter Properties</h4> <p>In addition to <code>MeterFilter</code> beans, you can apply a limited set of customization on a per-meter basis by using properties.
Per-meter customizations apply to any meter IDs that start with the given name.
The following example disables any meters that have an ID starting with <code>example.remote</code></p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.metrics.enable.example.remote=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  metrics:
    enable:
      example:
        remote: false
</code></pre></div><p>The following properties allow per-meter customization:</p> <table><thead><tr><th>Property</th> <th>Description</th></tr></thead> <tbody><tr><td><code>management.metrics.enable</code></td> <td>Whether to prevent meters from emitting any metrics.</td></tr> <tr><td><code>management.metrics.distribution.percentiles-histogram</code></td> <td>Whether to publish a histogram suitable for computing aggregable (across dimension) percentile approximations.</td></tr> <tr><td><code>management.metrics.distribution.minimum-expected-value</code>, <code>management.metrics.distribution.maximum-expected-value</code></td> <td>Publish fewer histogram buckets by clamping the range of expected values.</td></tr> <tr><td><code>management.metrics.distribution.percentiles</code></td> <td>Publish percentile values computed in your application</td></tr> <tr><td><code>management.metrics.distribution.expiry</code>, <code>management.metrics.distribution.buffer-length</code></td> <td>Give greater weight to recent samples by accumulating them in ring buffers which rotate after a configurable expiry, with a<br>configurable buffer length.</td></tr> <tr><td><code>management.metrics.distribution.slo</code></td> <td>Publish a cumulative histogram with buckets defined by your service-level objectives.</td></tr></tbody></table> <p>For more details on the concepts behind <code>percentiles-histogram</code>, <code>percentiles</code>, and <code>slo</code>, see the <a href="https://micrometer.io/docs/concepts#_histograms_and_percentiles" target="_blank" rel="noopener noreferrer">“Histograms and percentiles” section<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> of the Micrometer documentation.</p> <h3 id="_6-6-metrics-endpoint"><a href="#_6-6-metrics-endpoint" class="header-anchor">#</a> 6.6. Metrics Endpoint</h3> <p>Spring Boot provides a <code>metrics</code> endpoint that you can use diagnostically to examine the metrics collected by an application.
The endpoint is not available by default and must be exposed. See <a href="#actuator.endpoints.exposing">exposing endpoints</a> for more details.</p> <p>Navigating to <code>/actuator/metrics</code> displays a list of available meter names.
You can drill down to view information about a particular meter by providing its name as a selector — for example, <code>/actuator/metrics/jvm.memory.max</code>.</p> <table><thead><tr><th></th> <th>The name you use here should match the name used in the code, not the name after it has been naming-convention normalized for a monitoring system to which it is shipped.<br>In other words, if <code>jvm.memory.max</code> appears as <code>jvm_memory_max</code> in Prometheus because of its snake case naming convention, you should still use <code>jvm.memory.max</code> as the selector when inspecting the meter in the <code>metrics</code> endpoint.</th></tr></thead> <tbody></tbody></table> <p>You can also add any number of <code>tag=KEY:VALUE</code> query parameters to the end of the URL to dimensionally drill down on a meter — for example, <code>/actuator/metrics/jvm.memory.max?tag=area:nonheap</code>.</p> <table><thead><tr><th></th> <th>The reported measurements are the <em>sum</em> of the statistics of all meters that match the meter name and any tags that have been applied.<br>In the preceding example, the returned <code>Value</code> statistic is the sum of the maximum memory footprints of the “Code Cache”, “Compressed Class Space”, and “Metaspace” areas of the heap.<br>If you wanted to see only the maximum size for the “Metaspace”, you could add an additional <code>tag=id:Metaspace</code> — that is, <code>/actuator/metrics/jvm.memory.max?tag=area:nonheap&amp;tag=id:Metaspace</code>.</th></tr></thead> <tbody></tbody></table> <h2 id="_7-auditing"><a href="#_7-auditing" class="header-anchor">#</a> 7. Auditing</h2> <p>Once Spring Security is in play, Spring Boot Actuator has a flexible audit framework that publishes events (by default, “authentication success”, “failure” and “access denied” exceptions).
This feature can be very useful for reporting and for implementing a lock-out policy based on authentication failures.</p> <p>You can enable auditing by providing a bean of type <code>AuditEventRepository</code> in your application’s configuration.
For convenience, Spring Boot offers an <code>InMemoryAuditEventRepository</code>.<code>InMemoryAuditEventRepository</code> has limited capabilities, and we recommend using it only for development environments.
For production environments, consider creating your own alternative <code>AuditEventRepository</code> implementation.</p> <h3 id="_7-1-custom-auditing"><a href="#_7-1-custom-auditing" class="header-anchor">#</a> 7.1. Custom Auditing</h3> <p>To customize published security events, you can provide your own implementations of <code>AbstractAuthenticationAuditListener</code> and <code>AbstractAuthorizationAuditListener</code>.</p> <p>You can also use the audit services for your own business events.
To do so, either inject the <code>AuditEventRepository</code> bean into your own components and use that directly or publish an <code>AuditApplicationEvent</code> with the Spring <code>ApplicationEventPublisher</code> (by implementing <code>ApplicationEventPublisherAware</code>).</p> <h2 id="_8-http-tracing"><a href="#_8-http-tracing" class="header-anchor">#</a> 8. HTTP Tracing</h2> <p>You can enable HTTP Tracing by providing a bean of type <code>HttpTraceRepository</code> in your application’s configuration.
For convenience, Spring Boot offers <code>InMemoryHttpTraceRepository</code>, which stores traces for the last 100 (the default) request-response exchanges.<code>InMemoryHttpTraceRepository</code> is limited compared to other tracing solutions, and we recommend using it only for development environments.
For production environments, we recommend using a production-ready tracing or observability solution, such as Zipkin or Spring Cloud Sleuth.
Alternatively, you can create your own <code>HttpTraceRepository</code>.</p> <p>You can use the <code>httptrace</code> endpoint to obtain information about the request-response exchanges that are stored in the <code>HttpTraceRepository</code>.</p> <h3 id="_8-1-custom-http-tracing"><a href="#_8-1-custom-http-tracing" class="header-anchor">#</a> 8.1. Custom HTTP tracing</h3> <p>To customize the items that are included in each trace, use the <code>management.trace.http.include</code> configuration property.
For advanced customization, consider registering your own <code>HttpExchangeTracer</code> implementation.</p> <h2 id="_9-process-monitoring"><a href="#_9-process-monitoring" class="header-anchor">#</a> 9. Process Monitoring</h2> <p>In the <code>spring-boot</code> module, you can find two classes to create files that are often useful for process monitoring:</p> <ul><li><p><code>ApplicationPidFileWriter</code> creates a file that contains the application PID (by default, in the application directory with a file name of <code>application.pid</code>).</p></li> <li><p><code>WebServerPortFileWriter</code> creates a file (or files) that contain the ports of the running web server (by default, in the application directory with a file name of <code>application.port</code>).</p></li></ul> <p>By default, these writers are not activated, but you can enable them:</p> <ul><li><p><a href="#actuator.process-monitoring.configuration">By Extending Configuration</a></p></li> <li><p><a href="#actuator.process-monitoring.programmatically">Programmatically Enabling Process Monitoring</a></p></li></ul> <h3 id="_9-1-extending-configuration"><a href="#_9-1-extending-configuration" class="header-anchor">#</a> 9.1. Extending Configuration</h3> <p>In the <code>META-INF/spring.factories</code> file, you can activate the listener (or listeners) that writes a PID file:</p> <div class="language- extra-class"><pre class="language-text"><code>org.springframework.context.ApplicationListener=\
org.springframework.boot.context.ApplicationPidFileWriter,\
org.springframework.boot.web.context.WebServerPortFileWriter
</code></pre></div><h3 id="_9-2-programmatically-enabling-process-monitoring"><a href="#_9-2-programmatically-enabling-process-monitoring" class="header-anchor">#</a> 9.2. Programmatically Enabling Process Monitoring</h3> <p>You can also activate a listener by invoking the <code>SpringApplication.addListeners(…​)</code> method and passing the appropriate <code>Writer</code> object.
This method also lets you customize the file name and path in the <code>Writer</code> constructor.</p> <h2 id="_10-cloud-foundry-support"><a href="#_10-cloud-foundry-support" class="header-anchor">#</a> 10. Cloud Foundry Support</h2> <p>Spring Boot’s actuator module includes additional support that is activated when you deploy to a compatible Cloud Foundry instance.
The <code>/cloudfoundryapplication</code> path provides an alternative secured route to all <code>@Endpoint</code> beans.</p> <p>The extended support lets Cloud Foundry management UIs (such as the web application that you can use to view deployed applications) be augmented with Spring Boot actuator information.
For example, an application status page can include full health information instead of the typical “running” or “stopped” status.</p> <table><thead><tr><th></th> <th>The <code>/cloudfoundryapplication</code> path is not directly accessible to regular users.<br>To use the endpoint, you must pass a valid UAA token with the request.</th></tr></thead> <tbody></tbody></table> <h3 id="_10-1-disabling-extended-cloud-foundry-actuator-support"><a href="#_10-1-disabling-extended-cloud-foundry-actuator-support" class="header-anchor">#</a> 10.1. Disabling Extended Cloud Foundry Actuator Support</h3> <p>If you want to fully disable the <code>/cloudfoundryapplication</code> endpoints, you can add the following setting to your <code>application.properties</code> file:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.cloudfoundry.enabled=false
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  cloudfoundry:
    enabled: false
</code></pre></div><h3 id="_10-2-cloud-foundry-self-signed-certificates"><a href="#_10-2-cloud-foundry-self-signed-certificates" class="header-anchor">#</a> 10.2. Cloud Foundry Self-signed Certificates</h3> <p>By default, the security verification for <code>/cloudfoundryapplication</code> endpoints makes SSL calls to various Cloud Foundry services.
If your Cloud Foundry UAA or Cloud Controller services use self-signed certificates, you need to set the following property:</p> <p>Properties</p> <div class="language- extra-class"><pre class="language-text"><code>management.cloudfoundry.skip-ssl-validation=true
</code></pre></div><p>Yaml</p> <div class="language- extra-class"><pre class="language-text"><code>management:
  cloudfoundry:
    skip-ssl-validation: true
</code></pre></div><h3 id="_10-3-custom-context-path"><a href="#_10-3-custom-context-path" class="header-anchor">#</a> 10.3. Custom Context Path</h3> <p>If the server’s context-path has been configured to anything other than <code>/</code>, the Cloud Foundry endpoints are not available at the root of the application.
For example, if <code>server.servlet.context-path=/app</code>, Cloud Foundry endpoints are available at <code>/app/cloudfoundryapplication/*</code>.</p> <p>If you expect the Cloud Foundry endpoints to always be available at <code>/cloudfoundryapplication/*</code>, regardless of the server’s context-path, you need to explicitly configure that in your application.
The configuration differs, depending on the web server in use.
For Tomcat, you can add the following configuration:</p> <div class="language- extra-class"><pre class="language-text"><code>import java.io.IOException;
import java.util.Collections;

import javax.servlet.GenericServlet;
import javax.servlet.Servlet;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.catalina.Host;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;

import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class MyCloudFoundryConfiguration {

    @Bean
    public TomcatServletWebServerFactory servletWebServerFactory() {
        return new TomcatServletWebServerFactory() {

            @Override
            protected void prepareContext(Host host, ServletContextInitializer[] initializers) {
                super.prepareContext(host, initializers);
                StandardContext child = new StandardContext();
                child.addLifecycleListener(new Tomcat.FixContextListener());
                child.setPath(&quot;/cloudfoundryapplication&quot;);
                ServletContainerInitializer initializer = getServletContextInitializer(getContextPath());
                child.addServletContainerInitializer(initializer, Collections.emptySet());
                child.setCrossContext(true);
                host.addChild(child);
            }

        };
    }

    private ServletContainerInitializer getServletContextInitializer(String contextPath) {
        return (classes, context) -&gt; {
            Servlet servlet = new GenericServlet() {

                @Override
                public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
                    ServletContext context = req.getServletContext().getContext(contextPath);
                    context.getRequestDispatcher(&quot;/cloudfoundryapplication&quot;).forward(req, res);
                }

            };
            context.addServlet(&quot;cloudfoundry&quot;, servlet).addMapping(&quot;/*&quot;);
        };
    }

}

</code></pre></div><h2 id="_11-what-to-read-next"><a href="#_11-what-to-read-next" class="header-anchor">#</a> 11. What to Read Next</h2> <p>You might want to read about graphing tools such as <a href="https://graphiteapp.org" target="_blank" rel="noopener noreferrer">Graphite<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <p>Otherwise, you can continue on to read about <a href="/en/spring-boot/deployment.html#deployment">“deployment options”</a> or jump ahead for some in-depth information about Spring Boot’s <a href="/en/spring-boot/build-tool-plugins.html#build-tool-plugins">build tool plugins</a>.</p></div> <footer class="page-edit"><div class="edit-link"><a href="https://gitcode.net/dev-cloud/spring-docs/-/blob/master/docs/en/spring-boot/actuator.md" target="_blank" rel="noopener noreferrer">Edit this page on GitCode</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">Thu Mar 17 2022 18:19:53 GMT+0800</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">

      <a href="/en/spring-boot/container-images.html" class="prev">
        Container Images
      </a></span> <span class="next"><a href="/en/spring-boot/deployment.html">
        Deploying Spring Boot Applications
      </a>

    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.cf11b18e.js" defer></script><script src="/assets/js/3.50918073.js" defer></script><script src="/assets/js/4.cd4c3ff4.js" defer></script><script src="/assets/js/43.bbf1f09a.js" defer></script>
  </body>
</html>