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 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>3.4. Object Definitions</title>
<link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.14 Documentation">
<link rel="up" href="ch03.html" title="Chapter 3. Configuring Icinga">
<link rel="prev" href="configobject.html" title="3.3. Object Configuration Overview">
<link rel="next" href="customobjectvars.html" title="3.5. Custom Object Variables">
<script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">3.4. Object Definitions</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="configobject.html">Prev</a> </td>
<th width="60%" align="center">Chapter 3. Configuring Icinga</th>
<td width="20%" align="right"> <a accesskey="n" href="customobjectvars.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="3.4. Object Definitions">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="objectdefinitions"></a>3.4. <a name="object_definitions"></a>Object Definitions</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">3.4.1. <a href="objectdefinitions.html#host">Host definition</a></span></dt>
<dt><span class="section">3.4.2. <a href="objectdefinitions.html#hostgroup">Hostgroup Definition</a></span></dt>
<dt><span class="section">3.4.3. <a href="objectdefinitions.html#service">Service Definition</a></span></dt>
<dt><span class="section">3.4.4. <a href="objectdefinitions.html#servicegroup">Servicegroup Definition</a></span></dt>
<dt><span class="section">3.4.5. <a href="objectdefinitions.html#contact">Contact Definition</a></span></dt>
<dt><span class="section">3.4.6. <a href="objectdefinitions.html#contactgroup">Contactgroup Definition</a></span></dt>
<dt><span class="section">3.4.7. <a href="objectdefinitions.html#timeperiod">Timeperiod Definition</a></span></dt>
<dt><span class="section">3.4.8. <a href="objectdefinitions.html#command">Command Definition</a></span></dt>
<dt><span class="section">3.4.9. <a href="objectdefinitions.html#servicedepdency">Servicedependency Definition</a></span></dt>
<dt><span class="section">3.4.10. <a href="objectdefinitions.html#serviceescalation">Serviceescalation Definition</a></span></dt>
<dt><span class="section">3.4.11. <a href="objectdefinitions.html#hostdependency">Hostdependency Definition</a></span></dt>
<dt><span class="section">3.4.12. <a href="objectdefinitions.html#hostescalation">Hostescalation Definition</a></span></dt>
<dt><span class="section">3.4.13. <a href="objectdefinitions.html#hostextinfo">Hostextinfo Definition</a></span></dt>
<dt><span class="section">3.4.14. <a href="objectdefinitions.html#serviceextinfo">Serviceextinfo Definition</a></span></dt>
<dt><span class="section">3.4.15. <a href="objectdefinitions.html#module">Module Definition</a></span></dt>
</dl></div>
<p><span class="bold"><strong>Introduction</strong></span></p>
<p>One of the features of Icingas object configuration format is that you can create object definitions that inherit properties
from other object definitions. An explanation of how object inheritence works can be found <a class="link" href="objectinheritance.html" title="7.26. Object Inheritance">here</a>.
We strongly suggest that you familiarise yourself with object inheritence once you read over the documentation presented below, as it will
make the job of creating and maintaining object definitions much easier than it otherwise would be. Also, read up on the <a class="link" href="objecttricks.html" title="7.27. Time-Saving Tricks For Object Definitions">object tricks</a> that offer shortcuts for otherwise tedious configuration tasks.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>When creating and/or editing configuration files, keep the following in mind:</p>
</td></tr>
</table></div>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>Lines that start with a '#' character are taken to be comments and are not processed</p>
</li>
<li class="listitem">
<p>Directive names are case-sensitive</p>
</li>
<li class="listitem">
<p>Characters that appear after a semicolon (;) in configuration lines are treated as comments and are not processed</p>
</li>
</ol></div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Please try to avoid special characters in the object definitions.</p>
</td></tr>
</table></div>
<p><a name="objectdefinitions-retention_notes"></a><span class="bold"><strong>Retention Notes</strong></span></p>
<p>It is important to point out that several directives in host, service, and contact definitions may not be picked up by Icinga
when you change them in your configuration files. Object directives that can exhibit this behaviour are marked with an asterisk (<a class="link" href="objectdefinitions.html#objectdefinitions-retention_notes">*</a>). The reason for this behaviour is due to the fact that Icinga chooses to
honour values stored in the <a class="link" href="configmain.html#configmain-state_retention_file">state retention file</a> over values found in the config
files, assuming you have <a class="link" href="configmain.html#configmain-retain_state_information">state retention</a> enabled on a program-wide basis
<span class="emphasis"><em>and</em></span> the value of the directive is changed during runtime with an <a class="link" href="configmain.html#configmain-check_external_commands">external command</a>.</p>
<p>One way to get around this problem is to disable the retention of non-status information using the
<span class="emphasis"><em>retain_nonstatus_information</em></span> directive in the host, service, and contact definitions. Disabling this directive will
cause Icinga to take the initial values for these directives from your config files, rather than from the state retention file when
it (re)starts.</p>
<p><span class="bold"><strong>Sample Configuration Files</strong></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Sample object configuration files are installed in the <span class="emphasis"><em>/usr/local/icinga/etc/</em></span> directory when you follow the
<a class="link" href="quickstart.html" title="2.3. Quickstart Installation Guides">quickstart installation guide</a>.</p>
<p>If you installed a package then the sample files might be missing. The contents is listed <a class="link" href="sample-config.html" title="13.1. Sample configuration files and definitions">here</a> for reference.</p>
</td></tr>
</table></div>
<p><span class="bold"><strong>Object Types</strong></span></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-host">Host definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">Host group definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-service">Service definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-servicegroup">Service group definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-contact">Contact definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">Contact group definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">Time period definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-command">Command definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-servicedependency">Service dependency definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-serviceescalation">Service escalation definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-hostdependency">Host dependency definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-hostescalation">Host escalation definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-hostextinfo">Extended host information definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-serviceextinfo">Extended service information definitions</a></p>
<p><a class="link" href="objectdefinitions.html#objectdefinitions-module">Module definitions</a></p>
<a class="indexterm" name="idm140381634646272"></a>
<a class="indexterm" name="idm140381634645264"></a>
<div class="section" title="3.4.1. Host definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="host"></a>3.4.1. <a name="objectdefinitions-host"></a>Host definition</h3></div></div></div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>vrml_image and 3d_coords have been deprecated since 1.8 and removal of the 3d statusmap.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A host definition is used to define a physical server, workstation, device, etc. that resides on your network.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional. <span class="color"><font color="red">Please make sure that you read the notes on the "address", "contacts", and "contact_groups"
directive.</font></span></p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define host{</p></td></tr>
<tr>
<td><p></p></td>
<td><p><span class="color"><font color="red">host_name</font></span></p></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p><span class="color"><font color="red">alias</font></span></p></td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>display_name</p></td>
<td><p>display_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>address</p></td>
<td><p>address</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>address6</p></td>
<td><p>address6</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>parents</p></td>
<td><p>host_names</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>hostgroups</p></td>
<td><p>hostgroup_names</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>check_command</p></td>
<td><p>command_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>initial_state</p></td>
<td><p>[o,d,u]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">max_check_attempts</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>check_interval</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retry_interval</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>active_checks_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>passive_checks_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p><span class="color"><font color="red">check_period</font></span></p></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>obsess_over_host</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>check_freshness</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>freshness_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>event_handler</p></td>
<td>command_name</td>
</tr>
<tr>
<td><p></p></td>
<td><p>event_handler_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>low_flap_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>high_flap_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>flap_detection_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>flap_detection_options</p></td>
<td><p>[o,d,u,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>failure_prediction_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>process_perf_data</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_status_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_nonstatus_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td>contacts</td>
<td><p>contacts</p></td>
</tr>
<tr>
<td><p></p></td>
<td>contact_groups</td>
<td>contact_groups</td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red"><span class="emphasis"><em>notification_interval</em></span></font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_notification_delay</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red"><span class="emphasis"><em>notification_period</em></span></font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notification_options</p></td>
<td><p>[d,u,r,f,s,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notifications_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>stalking_options</p></td>
<td><p>[o,d,u,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td><p>note_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image</p></td>
<td><p>image_file</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image_alt</p></td>
<td><p>alt_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>statusmap_image</p></td>
<td><p> image_file </p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>2d_coords</p></td>
<td><p>x_coord,y_coord</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define host{
host_name bogus-router
alias Bogus Router #1
address 192.168.1.254
parents server-backbone
check_command check-host-alive
check_interval 5
retry_interval 1
max_check_attempts 5
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
contact_groups router-admins
notification_interval 30
notification_period 24x7
notification_options d,u,r
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to define a short name used to identify the host. It is used in host group and service
definitions to reference this particular host. Hosts can have multiple services (which are monitored) associated with them. When
used properly, the $HOSTNAME$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this short name.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is used to define a longer name or description used to identify the host. It is provided in order to
allow you to more easily identify a particular host. When used properly, the $HOSTALIAS$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a>
will contain this alias/description.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>address</strong></span>:</p></td>
<td>
<p>This directive is used to define the address of the host. Normally, this is an IP address, although it could really
be anything you want (so long as it can be used to check the status of the host). You can use a FQDN to identify the host
instead of an IP address, but if DNS services are not available this could cause problems. When used properly, the $HOSTADDRESS$
<a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this address. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>If you do not specify an address directive in a host definition, the name of the host will be used as its address.
<span class="color"><font color="red">A word of caution about doing this, however - if DNS fails, most of your service
checks will fail because the plugins will be unable to resolve the host name.</font></span></p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>address6</strong></span>:</p></td>
<td>
<p>This directive is used to define a second address for the host. Normally, this is an IPv6 address, although it
could really be anything you want (so long as it can be used to check the status of the host). You can use a FQDN to identify
the host instead of an IP address, but if DNS services are not available this could cause problems. When used properly, the
$HOSTADDRESS6$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this address. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>If you do not specify an address6 directive in a host definition, the name of the host will be used as its address. A
word of caution about doing this, however - if DNS fails, most of your service checks will fail because the plugins will be
unable to resolve the host name.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>display_name</strong></span>:</p></td>
<td>
<p>This directive is used to define an alternate name that should be displayed in the web interface for this host. If
not specified, this defaults to the value you specify for the <span class="emphasis"><em>host_name</em></span> directive. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>The CGIs up to Icinga 1.0.1 do not use this option.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>parents</strong></span>:</p></td>
<td><p>This directive is used to define a comma-delimited list of short names of the "parent" hosts for this particular
host. Parent hosts are typically routers, switches, firewalls, etc. that lie between the monitoring host and a remote hosts. A
router, switch, etc. which is closest to the remote host is considered to be that host's "parent". Read the "Determining Status
and Reachability of Network Hosts" document located <a class="link" href="networkreachability.html" title="5.10. Determining Status and Reachability of Network Hosts">here</a> for more information. If
this host is on the same network segment as the host doing the monitoring (without any intermediate routers, etc.) the host is
considered to be on the local network and will not have a parent host. Leave this value blank if the host does not have a parent
host (i.e. it is on the same segment as the Icinga host). The order in which you specify parent hosts has no effect on
how things are monitored.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroups</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the host belongs to. Multiple hostgroups should be separated by
commas. This directive may be used as an alternative to (or in addition to) using the <span class="emphasis"><em>members</em></span> directive in
<a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup</a> definitions.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_command</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">command</a> that should be used to check if the host is up or down. Typically, this
command would try and ping the host to see if it is "alive". The command must return a status of OK (0) or Icinga will
assume the host is down. If you leave this argument blank, the host will <span class="emphasis"><em>not</em></span> be actively checked. Thus,
Icinga will likely always assume the host is up (it may show up as being in a "PENDING" state in the web interface). This
is useful if you are monitoring printers or other devices that are frequently turned off. The maximum amount of time that the
notification command can run is controlled by the <a class="link" href="configmain.html#configmain-host_check_timeout">host_check_timeout</a>
option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>initial_state</strong></span>:</p></td>
<td><p>By default Icinga will assume that all hosts are in UP states when in starts. You can override the initial
state for a host by using this directive. Valid options are: <span class="bold"><strong>o</strong></span> = UP, <span class="bold"><strong>d</strong></span> = DOWN, and <span class="bold"><strong>u</strong></span> = UNREACHABLE. Default: o.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>max_check_attempts</strong></span>:</p></td>
<td>
<p>This directive is used to define the number of times that Icinga will retry the host check command if it
returns any state other than an OK state. This value will cause Icinga to generate an alert without retrying the host
check again. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>If you do not want to check the status of the host, you must still set this to a minimum value of 1. To bypass the
host check, just leave the <span class="emphasis"><em>check_command</em></span> option blank.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" between regularly scheduled checks of the host. Unless
you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60,
this number will mean minutes. More information on this value can be found in the <a class="link" href="checkscheduling.html" title="7.23. Service and Host Check Scheduling">check
scheduling</a> documentation. Floating point values are allowed. Default: 5.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retry_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before scheduling a re-check of the hosts.
Hosts are rescheduled at the retry interval when they have changed to a non-UP state. Once the host has been retried <span class="bold"><strong>max_check_attempts</strong></span> times without a change in its status, it will revert to being scheduled at its
"normal" rate as defined by the <span class="bold"><strong>check_interval</strong></span> value. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. More information on this value can be found in the <a class="link" href="checkscheduling.html" title="7.23. Service and Host Check Scheduling">check scheduling</a>
documentation. Floating point values are allowed. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>active_checks_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not active checks (either regularly scheduled or on-demand) of this
host are enabled. Values: 0 = disable active host checks, 1 = enable active host checks. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-execute_host_checks">execute_host_checks</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>passive_checks_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not passive checks are enabled for this host. Values: 0 = disable
passive host checks, 1 = enable passive host checks. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-accept_passive_host_checks">accept_passive_host_checks</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which active checks of this host can be made.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>obsess_over_host *</strong></span>:</p></td>
<td><p>This directive determines whether or not checks for the host will be "obsessed" over using the <a class="link" href="configmain.html#configmain-ochp_command">ochp_command</a>. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_freshness *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not <a class="link" href="freshness.html" title="7.5. Service and Host Freshness Checks">freshness checks</a> are enabled
for this host. Values: 0 = disable freshness checks, 1 = enable freshness checks. Default: 0.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-check_host_freshness">check_host_freshness</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>freshness_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the freshness threshold (in seconds) for this host. If you set this directive to
a value of 0, Icinga will determine a freshness threshold to use automatically. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>event_handler</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">command</a> that should be run whenever a change in the state of the host is detected
(i.e. whenever it goes down or recovers). Read the documentation on <a class="link" href="eventhandlers.html" title="7.3. Event Handlers">event handlers</a> for a
more detailed explanation of how to write scripts for handling events. The maximum amount of time that the event handler command
can run is controlled by the <a class="link" href="configmain.html#configmain-event_handler_timeout">event_handler_timeout</a>
option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>event_handler_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the event handler for this host is enabled. Values: 0 = disable
host event handler, 1 = enable host event handler. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_event_handlers">enable_event_handlers</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>low_flap_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the low state change threshold used in flap detection for this host. More
information on flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. If you set this directive to a value of 0, the
program-wide value specified by the <a class="link" href="configmain.html#configmain-low_host_flap_threshold">low_host_flap_threshold</a> directive
will be used. Floating point values are allowed. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>high_flap_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the high state change threshold used in flap detection for this host. More
information on flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. If you set this directive to a value of 0, the
program-wide value specified by the <a class="link" href="configmain.html#configmain-high_host_flap_threshold">high_host_flap_threshold</a>
directive will be used. Floating point values are allowed. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>flap_detection_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not flap detection is enabled for this host. More information on
flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. Values: 0 = disable host flap detection, 1 = enable host flap
detection. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_flap_detection">flap_detection</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>flap_detection_options</strong></span>:</p></td>
<td><p>This directive is used to determine what host states the <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flap detection logic</a> will
use for this host. Valid options are a combination of one or more of the following: <span class="bold"><strong>o</strong></span> = UP
states, <span class="bold"><strong>d</strong></span> = DOWN states, <span class="bold"><strong>u</strong></span> = UNREACHABLE states. Default:
o,d,u.</p></td>
</tr>
<tr>
<td><p><span class="bold"><strong>failure_prediction_enabled</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not failure prediction is enabled for this host. Values: 0 = disable
host failure prediction, 1 = enable host failure prediction. Default: 1. </p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>process_perf_data *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the processing of performance data is enabled for this host.
Values: 0 = disable performance data processing, 1 = enable performance data processing. Default: 1</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-process_performance_data">process_performance_data</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_status_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not status-related information about the host is retained across
program restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable status information
retention, 1 = enable status information retention. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_nonstatus_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not non-status information about the host is retained across program
restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable non-status
information retention, 1 = enable non-status information retention. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contacts</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> that should be notified whenever there are problems (or recoveries) with
this host. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and
don't want to configure <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a>. <span class="color"><font color="red">You must specify at least one contact or contact group in each host definition or nobody at all will be
notified</font></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contact_groups</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a> that should be notified whenever there are problems (or
recoveries) with this host. Multiple contact groups should be separated by commas. <span class="color"><font color="red">You
must specify at least one contact or contact group in each host definition or nobody at all will be
notified</font></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before re-notifying a contact that this host is
<span class="emphasis"><em>still</em></span> down or unreachable. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. If you set this value to 0, Icinga will <span class="emphasis"><em>not</em></span> re-notify contacts about problems for this host
- only one problem notification will be sent out. Floating point values are allowed. Default: 30.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_notification_delay</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before sending out the first problem
notification when this host enters a non-UP state. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. If you set this value to 0, Icinga will start sending out notifications immediately. Floating point values are
allowed. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which notifications of events for this host can be sent out to contacts. If a host goes down, becomes
unreachable, or recoveries during a time which is not covered by the time period, no notifications will be sent
out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_options</strong></span>:</p></td>
<td><p>This directive is used to determine when notifications for the host should be sent out. Valid options are a
combination of one or more of the following: <span class="bold"><strong>d</strong></span> = send notifications on a DOWN state, <span class="bold"><strong>u</strong></span> = send notifications on an UNREACHABLE state, <span class="bold"><strong>r</strong></span> = send notifications
on recoveries (OK state), <span class="bold"><strong>f</strong></span> = send notifications when the host starts and stops <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flapping</a>, and <span class="bold"><strong>s</strong></span> = send notifications when <a class="link" href="downtime.html" title="7.16. Scheduled Downtime">scheduled downtime</a> starts and ends. <span class="color"><font color="red">If you specify <span class="bold"><strong>n</strong></span> (none) as an option, no host notifications will be sent out.</font></span> If you do not specify any
notification options, Icinga will assume that you want notifications to be sent out for all possible states. Example: If
you specify <span class="bold"><strong>d,r</strong></span> in this field, notifications will only be sent out when the host goes DOWN and
when it recovers from a DOWN state. Default: d,u,r,f,s.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notifications_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not notifications for this host are enabled. Values: 0 = disable
host notifications, 1 = enable host notifications. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_notifications">enable_notifications</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>stalking_options</strong></span>:</p></td>
<td><p>This directive determines which host states "stalking" is enabled for. Valid options are a combination of one or
more of the following: <span class="bold"><strong>o</strong></span> = stalk on UP states, <span class="bold"><strong>d</strong></span> = stalk on
DOWN states, and <span class="bold"><strong>u</strong></span> = stalk on UNREACHABLE states. More information on state stalking can be
found <a class="link" href="stalking.html" title="7.14. State Stalking">here</a>. Default: n.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the host. If you specify a note here,
you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information
about the specified host).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td><p>This variable is used to define an optional URL that can be used to provide more information about the host. If you
specify an URL, you will see a red folder icon in the CGIs (when you are viewing host information) that links to the URL you
specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to
access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to make detailed information
on the host, emergency contact methods, etc. available to other support staff.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td>
<p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
host. If you specify an URL, you will see a red "splat" icon in the CGIs (when you are viewing host information) that links to
the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the same as
what is used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Since Icinga 1.0.2 you can use multiple urls for action_url and notes_url for host and service object
definitions. The syntax is as follows: </p>
<pre class="programlisting">notes_url|action_url 'firstURL' 'secondURL' 'thirdURL'</pre>
<p>
</p>
<pre class="programlisting">notes_url|action_url onlyoneURL</pre>
<p> Please keep in mind that using multiple urls also mean
multiple icon images. Those are hardcoded and e.g. action|notes.gif changes to 1-action|1-notes.gif and to
2-action|2-notes.gif and so on - make sure you'll have them in place when using multiple action_url|notes_url. If you are
using multiple urls with different icons (1-action.gif e.g.) you can still define the last urls without single quotes. It
will then be used like a single url and is referring to the normal icon (action.gif e.g.)</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this host. This
image will be displayed in the various places in the CGIs. The image will look best if it is 40x40 pixels in size. Images for
hosts are assumed to be in the <span class="bold"><strong>logos/</strong></span> subdirectory in your HTML images directory (i.e.
<span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image_alt</strong></span>:</p></td>
<td><p>This variable is used to define an optional string that is used in the ALT tag of the image specified by the
<span class="emphasis"><em><icon_image></em></span> argument.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>statusmap_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of an image that should be associated with this host in the <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a> CGI. You can specify a JPEG, PNG, and GIF image if you want, although we would
strongly suggest using a GD2 format image, as other image formats will result in a lot of wasted CPU time when the statusmap
image is generated. GD2 images can be created from PNG images by using the <span class="bold"><strong>pngtogd2</strong></span> utility
supplied with Thomas Boutell's <a class="link" href="http://www.boutell.com/gd/" target="_top">gd library</a>. The GD2 images should be created
in <span class="emphasis"><em>uncompressed</em></span> format in order to minimize CPU load when the statusmap CGI is generating the network map
image. The image will look best if it is 40x40 pixels in size. You can leave these option blank if you are not using the
statusmap CGI. Images for hosts are assumed to be in the <span class="bold"><strong>logos/</strong></span> subdirectory in your HTML
images directory (i.e. <span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>2d_coords</strong></span>:</p></td>
<td>
<p>This variable is used to define coordinates to use when drawing the host in the <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a> CGI. Coordinates should be given in positive integers, as they correspond to
physical pixels in the generated image. The origin for drawing (0,0) is in the upper left hand corner of the image and extends
in the positive x direction (to the right) along the top of the image and in the positive y direction (down) along the left hand
side of the image. For reference, the size of the icons drawn is usually about 40x40 pixels (text takes a little extra space).
The coordinates you specify here are for the upper left hand corner of the host icon that is drawn. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Don't worry about what the maximum x and y coordinates that you can use are. The CGI will automatically calculate the
maximum dimensions of the image it creates based on the largest x and y coordinates you specify.</p>
</td></tr>
</table></div>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381634531040"></a>
<a class="indexterm" name="idm140381634325184"></a>
</div>
<div class="section" title="3.4.2. Hostgroup Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="hostgroup"></a>3.4.2. <a name="objectdefinitions-hostgroup"></a>Hostgroup Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A host group definition is used to group one or more hosts together for simplifying configuration with <a class="link" href="objecttricks.html" title="7.27. Time-Saving Tricks For Object Definitions">object tricks</a> or display purposes in the <a class="link" href="cgis.html" title="6.1. Icinga Classic UI: Information On The Modules">CGIs</a>.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define hostgroup{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">hostgroup_name</font></span></td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">alias</font></span></td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td>members</td>
<td>hosts</td>
</tr>
<tr>
<td><p></p></td>
<td>hostgroup_members</td>
<td><p>hostgroups</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td><p>note_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define hostgroup{
hostgroup_name novell-servers
alias Novell Servers
members netware1,netware2,netware3,netware4
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to define a short name used to identify the host group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is used to define is a longer name or description used to identify the host group. It is provided in
order to allow you to more easily identify a particular host group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>members</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of <a class="link" href="objectdefinitions.html#objectdefinitions-host">hosts</a> that
should be included in this group. Multiple host names should be separated by commas. This directive may be used as an
alternative to (or in addition to) the <span class="emphasis"><em>hostgroups</em></span> directive in <a class="link" href="objectdefinitions.html#objectdefinitions-host">host
definitions</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_members</strong></span>:</p></td>
<td><p>This optional directive can be used to include hosts from other "sub" host groups in this host group. Specify a
comma-delimited list of short names of other host groups whose members should be included in this group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the host. If you specify a note here,
you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information
about the specified host).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td><p>This variable is used to define an optional URL that can be used to provide more information about the host group.
If you specify an URL, you will see a red folder icon in the CGIs (when you are viewing hostgroup information) that links to the
URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is
used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to make detailed
information on the host group, emergency contact methods, etc. available to other support staff.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
host group. If you specify an URL, you will see a red "splat" icon in the CGIs (when you are viewing hostgroup information) that
links to the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the
same as what is used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381634262208"></a>
<a class="indexterm" name="idm140381634261104"></a>
</div>
<div class="section" title="3.4.3. Service Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="service"></a>3.4.3. <a name="objectdefinitions-service"></a>Service Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A service definition is used to identify a "service" that runs on a host. The term "service" is used very loosely. It can mean an
actual service that runs on the host (POP, SMTP, HTTP, etc.) or some other type of metric associated with the host (response to a ping,
number of logged in users, free disk space, etc.). The different arguments to a service definition are outlined below.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Please note that some directives may be inherited from the host definition. For details refer to <a class="link" href="objectinheritance.html#objectinheritance-implied_inheritance" title="7.26.9. Implied Inheritance">implied inheritance</a>.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional. <span class="color"><font color="red">Please make sure that you read the notes on the "contacts", and "contact_groups"
directive.</font></span></p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define service{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>hostgroup_name</td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_description</font></span></td>
<td><p>service_description</p></td>
</tr>
<tr>
<td><p></p></td>
<td>display_name</td>
<td><p>display_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>servicegroups</p></td>
<td><p>servicegroup_names</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>is_volatile</p></td>
<td><p>[0|1|2]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">check_command</font></span></td>
<td><p>command_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>initial_state</p></td>
<td><p>[o,w,u,c]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">max_check_attempts</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">check_interval</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">retry_interval</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>active_checks_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>passive_checks_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">check_period</font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>obsess_over_service</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>check_freshness</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>freshness_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td>event_handler</td>
<td>command_name</td>
</tr>
<tr>
<td><p></p></td>
<td><p>event_handler_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>low_flap_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>high_flap_threshold</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>flap_detection_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>flap_detection_options</p></td>
<td><p>[o,w,c,u,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>failure_prediction_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>process_perf_data</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_status_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_nonstatus_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">notification_interval</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_notification_delay</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">notification_period</font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notification_options</p></td>
<td><p>[w,u,c,r,f,s,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notifications_enabled</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td>contacts</td>
<td><p>contacts</p></td>
</tr>
<tr>
<td><p></p></td>
<td>contact_groups</td>
<td><p>contact_groups</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>stalking_options</p></td>
<td><p>[o,w,u,c,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td><p>note_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td>url</td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td>url</td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image</p></td>
<td>image_file</td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image_alt</p></td>
<td>alt_string</td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define service{
host_name linux-server
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups linux-admins
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a> that the service "runs" on or is associated with. Multiple hosts should be
separated by commas.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the service "runs" on or is associated with. Multiple hostgroups
should be separated by commas. The hostgroup_name may be used instead of, or in addition to, the host_name
directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_description;</strong></span>:</p></td>
<td><p>This directive is used to define the description of the service, which may contain spaces, dashes, and colons
(semicolons, apostrophes, and quotation marks should be avoided). No two services associated with the same host can have the
same description. Services are uniquely identified with their <span class="emphasis"><em>host_name</em></span> and
<span class="emphasis"><em>service_description</em></span> directives.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>display_name</strong></span>:</p></td>
<td>
<p>This directive is used to define an alternate name that should be displayed in the web interface for this service.
If not specified, this defaults to the value you specify for the <span class="emphasis"><em>service_description</em></span> directive. </p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>The CGIs up to Icinga 1.0.1 do not use this option.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>servicegroups</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-servicegroup">servicegroup(s)</a> that the service belongs to. Multiple servicegroups should be
separated by commas. This directive may be used as an alternative to using the <span class="emphasis"><em>members</em></span> directive in <a class="link" href="objectdefinitions.html#objectdefinitions-servicegroup">servicegroup</a> definitions.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>is_volatile</strong></span>:</p></td>
<td><p>This directive is used to denote whether the service is "volatile". Services are normally <span class="emphasis"><em>not</em></span>
volatile. More information on volatile service and how they differ from normal services can be found <a class="link" href="volatileservices.html" title="7.4. Volatile Services">here</a>. Value: 0 = service is not volatile, 1 = service is volatile, 2 = service is volatile but
will respect the re-notification interval for notifications (option "2" was introduced in Icinga 1.0.2). Default:
0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_command</strong></span>:</p></td>
<td><p> This directive is used to specify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">command</a> that Icinga will run in order to check the status of the service. The
maximum amount of time that the service check command can run is controlled by the <a class="link" href="configmain.html#configmain-service_check_timeout">service_check_timeout</a> option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>initial_state</strong></span>:</p></td>
<td><p>By default Icinga will assume that all services are in OK states when in starts. You can override the
initial state for a service by using this directive. Valid options are: <span class="bold"><strong>o</strong></span> = OK, <span class="bold"><strong>w</strong></span> = WARNING, <span class="bold"><strong>u</strong></span> = UNKNOWN, and <span class="bold"><strong>c</strong></span> =
CRITICAL. Default: o.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>max_check_attempts</strong></span>:</p></td>
<td><p>This directive is used to define the number of times that Icinga will retry the service check command if it
returns any state other than an OK state. This value will cause Icinga to generate an alert without retrying the service
check again.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before scheduling the next "regular" check of
the service. "Regular" checks are those that occur when the service is in an OK state or when the service is in a non-OK state,
but has already been rechecked <span class="bold"><strong>max_check_attempts</strong></span> number of times. Unless you've changed the
<a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. More information on this value can be found in the <a class="link" href="checkscheduling.html" title="7.23. Service and Host Check Scheduling">check scheduling</a>
documentation. Floating point values are allowed. Default: 5.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retry_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before scheduling a re-check of the service.
Services are rescheduled at the retry interval when they have changed to a non-OK state. Once the service has been retried
<span class="bold"><strong>max_check_attempts</strong></span> times without a change in its status, it will revert to being scheduled at
its "normal" rate as defined by the <span class="bold"><strong>check_interval</strong></span> value. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. More information on this value can be found in the <a class="link" href="checkscheduling.html" title="7.23. Service and Host Check Scheduling">check scheduling</a>
documentation. Floating point values are allowed. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>active_checks_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not active checks of this service are enabled. Values: 0 = disable
active service checks, 1 = enable active service checks. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-execute_service_checks">execute_service_checks</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>passive_checks_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not passive checks of this service are enabled. Values: 0 = disable
passive service checks, 1 = enable passive service checks. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-accept_passive_service_checks">accept_passive_service_checks</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which active checks of this service can be made.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>obsess_over_service *</strong></span>:</p></td>
<td><p>This directive determines whether or not checks for the service will be "obsessed" over using the <a class="link" href="configmain.html#configmain-ocsp_command">ocsp_command</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>check_freshness *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not <a class="link" href="freshness.html" title="7.5. Service and Host Freshness Checks">freshness checks</a> are enabled
for this service. Values: 0 = disable freshness checks, 1 = enable freshness checks. Default: 0.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-check_service_freshness">check_service_freshness</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>freshness_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the freshness threshold (in seconds) for this service. If you set this directive
to a value of 0, Icinga will determine a freshness threshold to use automatically. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>event_handler</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">command</a> that should be run whenever a change in the state of the service is detected
(i.e. whenever it goes down or recovers). Read the documentation on <a class="link" href="eventhandlers.html" title="7.3. Event Handlers">event handlers</a> for a
more detailed explanation of how to write scripts for handling events. The maximum amount of time that the event handler command
can run is controlled by the <a class="link" href="configmain.html#configmain-event_handler_timeout">event_handler_timeout</a>
option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>event_handler_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the event handler for this service is enabled. Values: 0 =
disable service event handler, 1 = enable service event handler. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_event_handlers">enable_event_handlers</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>low_flap_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the low state change threshold used in flap detection for this service. More
information on flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. If you set this directive to a value of 0, the
program-wide value specified by the <a class="link" href="configmain.html#configmain-low_service_flap_threshold">low_service_flap_threshold</a>
directive will be used. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>high_flap_threshold</strong></span>:</p></td>
<td><p>This directive is used to specify the high state change threshold used in flap detection for this service. More
information on flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. If you set this directive to a value of 0, the
program-wide value specified by the <a class="link" href="configmain.html#configmain-high_service_flap_threshold">high_service_flap_threshold</a>
directive will be used. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>flap_detection_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not flap detection is enabled for this service. More information on
flap detection can be found <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">here</a>. Values: 0 = disable service flap detection, 1 = enable service
flap detection. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_flap_detection">enable_flap_detection</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>flap_detection_options</strong></span>:</p></td>
<td><p>This directive is used to determine what service states the <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flap detection logic</a>
will use for this service. Valid options are a combination of one or more of the following: <span class="bold"><strong>o</strong></span> =
OK states, <span class="bold"><strong>w</strong></span> = WARNING states, <span class="bold"><strong>c</strong></span> = CRITICAL states, <span class="bold"><strong>u</strong></span> = UNKNOWN states. Default: o,w,u,c.</p></td>
</tr>
<tr>
<td><p><span class="bold"><strong>failure_prediction_enabled</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not failure prediction is enabled for this service. Values: 0 =
disable service failure prediction, 1 = enable service failure prediction.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>process_perf_data *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the processing of performance data is enabled for this service.
Values: 0 = disable performance data processing, 1 = enable performance data processing. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-process_performance_data">process_performance_data</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_status_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not status-related information about the service is retained across
program restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable status information
retention, 1 = enable status information retention. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_nonstatus_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not non-status information about the service is retained across
program restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable non-status
information retention, 1 = enable non-status information retention. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_interval</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before re-notifying a contact that this service
is <span class="emphasis"><em>still</em></span> in a non-OK state. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. If you set this value to 0, Icinga will <span class="emphasis"><em>not</em></span> re-notify contacts about problems for this
service - only one problem notification will be sent out. Floating point values are allowed. Default: 30.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_notification_delay</strong></span>:</p></td>
<td><p>This directive is used to define the number of "time units" to wait before sending out the first problem
notification when this service enters a non-OK state. Unless you've changed the <a class="link" href="configmain.html#configmain-interval_length">interval_length</a> directive from the default value of 60, this number will mean
minutes. If you set this value to 0, Icinga will start sending out notifications immediately.Floating point values are
allowed. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which notifications of events for this service can be sent out to contacts. No service notifications will
be sent out during times which is not covered by the time period.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_options</strong></span>:</p></td>
<td><p>This directive is used to determine when notifications for the service should be sent out. Valid options are a
combination of one or more of the following: <span class="bold"><strong>w</strong></span> = send notifications on a WARNING state,
<span class="bold"><strong>u</strong></span> = send notifications on an UNKNOWN state, <span class="bold"><strong>c</strong></span> = send
notifications on a CRITICAL state, <span class="bold"><strong>r</strong></span> = send notifications on recoveries (OK state), <span class="bold"><strong>f</strong></span> = send notifications when the service starts and stops <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flapping</a>, and
<span class="bold"><strong>s</strong></span> = send notifications when <a class="link" href="downtime.html" title="7.16. Scheduled Downtime">scheduled downtime</a> starts and ends.
<span class="color"><font color="red">If you specify <span class="bold"><strong>n</strong></span> (none) as an option, no service
notifications will be sent out.</font></span> If you do not specify any notification options, Icinga will assume that you
want notifications to be sent out for all possible states. Example: If you specify <span class="bold"><strong>w,r</strong></span> in this
field, notifications will only be sent out when the service goes into a WARNING state and when it recovers from a WARNING state.
Default: u,w,c,r,f,s</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notifications_enabled *</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not notifications for this service are enabled. Values: 0 = disable
service notifications, 1 = enable service notifications. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_notifications">enable_notifications</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contacts</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> that should be notified whenever there are problems (or recoveries) with
this service. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and
don't want to configure <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a>. <span class="color"><font color="red">You must specify at least one contact or contact group in each service definition or nobody at all will be
notified</font></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contact_groups</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a> that should be notified whenever there are problems (or
recoveries) with this service. Multiple contact groups should be separated by commas. <span class="color"><font color="red">You
must specify at least one contact or contact group in each service definition or nobody at all will be
notified</font></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>stalking_options</strong></span>:</p></td>
<td><p>This directive determines which service states "stalking" is enabled for. Valid options are a combination of one or
more of the following: <span class="bold"><strong>o</strong></span> = stalk on OK states, <span class="bold"><strong>w</strong></span> = stalk on
WARNING states, <span class="bold"><strong>u</strong></span> = stalk on UNKNOWN states, and <span class="bold"><strong>c</strong></span> = stalk on
CRITICAL states. More information on state stalking can be found <a class="link" href="stalking.html" title="7.14. State Stalking">here</a>. Default:
n.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the service. If you specify a note here,
you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information
about the specified service).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td>
<p>This directive is used to define an optional URL that can be used to provide more information about the service. If
you specify an URL, you will see a red folder icon in the CGIs (when you are viewing service information) that links to the URL
you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is
used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to make detailed
information on the service, emergency contact methods, etc. available to other support staff.</p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Since Icinga 1.0.2 you can use multiple urls for action_url and notes_url for host and service object
definitions. The syntax is as follows: </p>
<pre class="programlisting">notes_url|action_url 'firstURL' 'secondURL' 'thirdURL'</pre>
<p>
</p>
<pre class="programlisting">notes_url|action_url onlyoneURL</pre>
<p> Please keep in mind that using multiple urls also mean
multiple icon images. Those are hardcoded and e.g. action|notes.gif changes to 1-action|1-notes.gif and to
2-action|2-notes.gif and so on - make sure you'll have them in place when using multiple action_url|notes_url. If you are
using multiple urls with different icons (1-action.gif e.g.) you can still define the last urls without single quotes. It
will then be used like a single url and is referring to the normal icon (action.gif e.g.)</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
service. If you specify an URL, you will see a red "splat" icon in the CGIs (when you are viewing service information) that
links to the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the
same as what is used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this service.
This image will be displayed in the <a class="link" href="cgis.html#cgis-status_cgi">status</a> and <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGIs. The image will look best if it is 40x40 pixels in size. Images for services are assumed to be in the
<span class="bold"><strong>logos/</strong></span> subdirectory in your HTML images directory (i.e.
<span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image_alt</strong></span>:</p></td>
<td><p>This variable is used to define an optional string that is used in the ALT tag of the image specified by the
<span class="emphasis"><em><icon_image></em></span> argument. The ALT tag is used in the <a class="link" href="cgis.html#cgis-status_cgi">status</a>,
<a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> and <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a>
CGIs.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381634152416"></a>
<a class="indexterm" name="idm140381633960848"></a>
</div>
<div class="section" title="3.4.4. Servicegroup Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="servicegroup"></a>3.4.4. <a name="objectdefinitions-servicegroup"></a>Servicegroup Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A service group definition is used to group one or more services together for simplifying configuration with <a class="link" href="objecttricks.html" title="7.27. Time-Saving Tricks For Object Definitions">object tricks</a> or display purposes in the <a class="link" href="cgis.html" title="6.1. Icinga Classic UI: Information On The Modules">CGIs</a>.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define servicegroup{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">servicegroup_name</font></span></td>
<td><p>servicegroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">alias</font></span></td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td>members</td>
<td><p>services</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>servicegroup_members</p></td>
<td><p>servicegroups</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td><p>note_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define servicegroup{
servicegroup_name dbservices
alias Database Services
members ms1,SQL Server,ms1,SQL Server Agent,ms1,SQL DTC
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>servicegroup_name</strong></span>:</p></td>
<td><p>This directive is used to define a short name used to identify the service group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is used to define is a longer name or description used to identify the service group. It is provided
in order to allow you to more easily identify a particular service group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>members</strong></span>:</p></td>
<td>
<p>This is a list of the <span class="emphasis"><em>descriptions</em></span> of <a class="link" href="objectdefinitions.html#objectdefinitions-service">services</a> (and the names of their corresponding hosts) that should be included in this
group. Host and service names should be separated by commas. This directive may be used as an alternative to the
<span class="emphasis"><em>servicegroups</em></span> directive in <a class="link" href="objectdefinitions.html#objectdefinitions-service">service definitions</a>. The format
of the member directive is as follows (note that a host name must precede a service name/description):</p> <p>
members=<host1>,<service1>,<host2>,<service2>,...,<host<span class="emphasis"><em>n</em></span>>,<service<span class="emphasis"><em>n</em></span>></p>
<p>It is possible to use "*" as a wildcard for all hosts. Please note that it is NOT possible to exclude neither hosts nor
services using the "!" at the beginning of the host or service.</p>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>servicegroup_members</strong></span>:</p></td>
<td><p>This optional directive can be used to include services from other "sub" service groups in this service group.
Specify a comma-delimited list of short names of other service groups whose members should be included in this
group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the service group. If you specify a note
here, you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing
information about the specified service group).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more information about the service
group. If you specify an URL, you will see a red folder icon in the CGIs (when you are viewing service group information) that
links to the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base path will the the
same as what is used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to
make detailed information on the service group, emergency contact methods, etc. available to other support staff.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
service group. If you specify an URL, you will see a red "splat" icon in the CGIs (when you are viewing service group
information) that links to the URL you specify here. Any valid URL can be used. If you plan on using relative paths, the base
path will the the same as what is used to access the CGIs (i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633895504"></a>
<a class="indexterm" name="idm140381633894496"></a>
</div>
<div class="section" title="3.4.5. Contact Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="contact"></a>3.4.5. <a name="objectdefinitions-contact"></a>Contact Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A contact definition is used to identify someone who should be contacted in the event of a problem on your network. The different
arguments to a contact definition are described below.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define contact{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contact_name</font></span></td>
<td><p>contact_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>alias</td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td>contactgroups</td>
<td><p>contactgroup_names</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_notifications_enabled</font></span></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_notifications_enabled</font></span></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_notification_period</font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_notification_period</font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_notification_options</font></span></td>
<td><p>[d,u,r,f,s,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_notification_options</font></span></td>
<td><p>[w,u,c,r,f,s,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_notification_commands</font></span></td>
<td><p>command_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_notification_commands</font></span></td>
<td><p>command_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>email</p></td>
<td><p>email_address</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>pager</p></td>
<td><p>pager_number or pager_email_gateway </p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>address<span class="emphasis"><em>x</em></span></p></td>
<td>additional_contact_address</td>
</tr>
<tr>
<td><p></p></td>
<td><p>can_submit_commands</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_status_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>retain_nonstatus_information</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define contact{
contact_name jdoe
alias John Doe
host_notifications_enabled 1
service_notifications_enabled 1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email jdoe@localhost.localdomain
pager 555-5555@pagergateway.localhost.localdomain
address1 xxxxx.xyyy@icq.com
address2 555-555-5555
can_submit_commands 1
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contact_name</strong></span>:</p></td>
<td><p>This directive is used to define a short name used to identify the contact. It is referenced in <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact group</a> definitions. Under the right circumstances, the $CONTACTNAME$
<a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this value.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is used to define a longer name or description for the contact. Under the rights circumstances, the
$CONTACTALIAS$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this value. If not specified, the
<span class="emphasis"><em>contact_name</em></span> will be used as the alias.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contactgroups</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contactgroup(s)</a> that the contact belongs to. Multiple contactgroups should be
separated by commas. This directive may be used as an alternative to (or in addition to) using the <span class="emphasis"><em>members</em></span>
directive in <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contactgroup</a> definitions.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_notifications_enabled</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the contact will receive notifications about host problems and
recoveries. Values: 0 = don't send notifications, 1 = send notifications. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_notifications">enable_notifications</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_notifications_enabled</strong></span>:</p></td>
<td>
<p>This directive is used to determine whether or not the contact will receive notifications about service problems
and recoveries. Values: 0 = don't send notifications, 1 = send notifications. Default: 1.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>This value will have no effect if "<a class="link" href="configmain.html#configmain-enable_notifications">enable_notifications</a>=0".</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_notification_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which the contact can be notified about host problems or recoveries. You can think of this as an "on call"
time for host notifications for the contact. Read the documentation on <a class="link" href="timeperiods.html" title="5.9. Time Periods">time periods</a> for more
information on how this works and potential problems that may result from improper use.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_notification_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which the contact can be notified about service problems or recoveries. You can think of this as an "on
call" time for service notifications for the contact. Read the documentation on <a class="link" href="timeperiods.html" title="5.9. Time Periods">time periods</a>
for more information on how this works and potential problems that may result from improper use.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_notification_commands</strong></span>:</p></td>
<td><p>This directive is used to define a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">commands</a> used to notify the contact of a <span class="emphasis"><em>host</em></span> problem or
recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact
needs to be notified. The maximum amount of time that a notification command can run is controlled by the <a class="link" href="configmain.html#configmain-notification_timeout">notification_timeout</a> option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_notification_options</strong></span>:</p></td>
<td><p>This directive is used to define the host states for which notifications can be sent out to this contact. Valid
options are a combination of one or more of the following: <span class="bold"><strong>d</strong></span> = notify on DOWN host states,
<span class="bold"><strong>u</strong></span> = notify on UNREACHABLE host states, <span class="bold"><strong>r</strong></span> = notify on host
recoveries (UP states), <span class="bold"><strong>f</strong></span> = notify when the host starts and stops <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flapping</a>, and <span class="bold"><strong>s</strong></span> = send notifications when host or service <a class="link" href="downtime.html" title="7.16. Scheduled Downtime">scheduled downtime</a> starts and ends. <span class="color"><font color="red">If you specify <span class="bold"><strong>n</strong></span> (none) as an option, the contact will not receive any type of host notifications.</font></span> Default:
<span class="bold"><strong>n</strong></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_notification_options</strong></span>:</p></td>
<td><p>This directive is used to define the service states for which notifications can be sent out to this contact. Valid
options are a combination of one or more of the following: <span class="bold"><strong>w</strong></span> = notify on WARNING service
states, <span class="bold"><strong>u</strong></span> = notify on UNKNOWN service states, <span class="bold"><strong>c</strong></span> = notify on
CRITICAL service states, <span class="bold"><strong>r</strong></span> = notify on service recoveries (OK states), and <span class="bold"><strong>f</strong></span> = notify when the service starts and stops <a class="link" href="flapping.html" title="7.8. Detection and Handling of State Flapping">flapping</a>.<span class="color"><font color="red"> If you specify <span class="bold"><strong>n</strong></span> (none) as an option, the contact will not
receive any type of service notifications.</font></span> Default: <span class="bold"><strong>n</strong></span>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_notification_commands</strong></span>:</p></td>
<td><p>This directive is used to define a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-command">commands</a> used to notify the contact of a <span class="emphasis"><em>service</em></span> problem or
recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact
needs to be notified. The maximum amount of time that a notification command can run is controlled by the <a class="link" href="configmain.html#configmain-notification_timeout">notification_timeout</a> option.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>email</strong></span>:</p></td>
<td><p>This directive is used to define an email address for the contact. Depending on how you configure your notification
commands, it can be used to send out an alert email to the contact. Under the right circumstances, the $CONTACTEMAIL$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this value.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>pager</strong></span>:</p></td>
<td><p>This directive is used to define a pager number for the contact. It can also be an email address to a pager gateway
(i.e. pagejoe@pagenet.com). Depending on how you configure your notification commands, it can be used to send out an alert page
to the contact. Under the right circumstances, the $CONTACTPAGER$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this
value.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>addressx</strong></span>:</p></td>
<td><p>Address directives are used to define additional "addresses" for the contact. These addresses can be anything -
cell phone numbers, instant messaging addresses, etc. Depending on how you configure your notification commands, they can be
used to send out an alert to the contact. Up to six addresses can be defined using these directives
(<span class="emphasis"><em>address1</em></span> through <span class="emphasis"><em>address6</em></span>). The $CONTACTADDRESS<span class="emphasis"><em>x</em></span>$ <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macro</a> will contain this value.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>can_submit_commands</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not the contact can submit <a class="link" href="extcommands.html" title="7.1. External Commands">external
commands</a> to Icinga from the CGIs. Values: 0 = don't allow contact to submit commands, 1 = allow contact to submit
commands.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_status_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not status-related information about the contact is retained across
program restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable status information
retention, 1 = enable status information retention. Default: 1.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>retain_nonstatus_information</strong></span>:</p></td>
<td><p>This directive is used to determine whether or not non-status information about the contact is retained across
program restarts. This is only useful if you have enabled state retention using the <a class="link" href="configmain.html#configmain-retain_state_information">retain_state_information</a> directive. Value: 0 = disable non-status
information retention, 1 = enable non-status information retention. Default: 1.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633746928"></a>
<a class="indexterm" name="idm140381633745920"></a>
</div>
<div class="section" title="3.4.6. Contactgroup Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="contactgroup"></a>3.4.6. <a name="objectdefinitions-contactgroup"></a>Contactgroup Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A contact group definition is used to group one or more <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> together for the
purpose of sending out alert/recovery <a class="link" href="notifications.html" title="5.11. Notifications">notifications</a>.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define contactgroup{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contactgroup_name</font></span></td>
<td><p>contactgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">alias</font></span></td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td>members</td>
<td><p>contacts</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>contactgroup_members</p></td>
<td><p>contactgroups</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define contactgroup{
contactgroup_name novell-admins
alias Novell Administrators
members jdoe,rtobert,tzach
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contactgroup_name</strong></span>:</p></td>
<td><p>This directive is a short name used to identify the contact group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is used to define a longer name or description used to identify the contact group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>members</strong></span>:</p></td>
<td><p>This directive is used to define a list of the <span class="emphasis"><em>short names</em></span> of <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> that should be included in this group. Multiple contact names should be
separated by commas. This directive may be used as an alternative to (or in addition to) using the
<span class="emphasis"><em>contactgroups</em></span> directive in <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contact</a>
definitions.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contactgroup_members</strong></span>:</p></td>
<td><p>This optional directive can be used to include contacts from other "sub" contact groups in this contact group.
Specify a comma-delimited list of short names of other contact groups whose members should be included in this
group.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633700048"></a>
<a class="indexterm" name="idm140381633699040"></a>
</div>
<div class="section" title="3.4.7. Timeperiod Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="timeperiod"></a>3.4.7. <a name="objectdefinitions-timeperiod"></a>Timeperiod Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A time period is a list of times during various days that are considered to be "valid" times for notifications and service checks.
It consists of time ranges for each day of the week that "rotate" once the week has come to an end. Different types of exceptions to the
normal weekly time are supported, including: specific weekdays, days of generic months, days of specific months, and calendar
dates.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define timeperiod{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">timeperiod_name</font></span></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">alias</font></span></td>
<td><p>alias</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>[weekday]</p></td>
<td><p>timeranges</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>[exception]</p></td>
<td><p>timeranges</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>exclude</p></td>
<td>[timeperiod1,timeperiod2,...,timeperiodn]</td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definitions:</em></span></p>
<pre class="screen"> define timeperiod{
timeperiod_name nonworkhours
alias Non-Work Hours
sunday 00:00-24:00 ; Every Sunday of every week
monday 00:00-09:00,17:00-24:00 ; Every Monday of every week
tuesday 00:00-09:00,17:00-24:00 ; Every Tuesday of every week
wednesday 00:00-09:00,17:00-24:00 ; Every Wednesday of every week
thursday 00:00-09:00,17:00-24:00 ; Every Thursday of every week
friday 00:00-09:00,17:00-24:00 ; Every Friday of every week
saturday 00:00-24:00 ; Every Saturday of every week
}
define timeperiod{
timeperiod_name misc-single-days
alias Misc Single Days
1999-01-28 00:00-24:00 ; January 28th, 1999
monday 3 00:00-24:00 ; 3rd Monday of every month
day 2 00:00-24:00 ; 2nd day of every month
february 10 00:00-24:00 ; February 10th of every year
february -1 00:00-24:00 ; Last day in February of every year
friday -2 00:00-24:00 ; 2nd to last Friday of every month
thursday -1 november 00:00-24:00 ; Last Thursday in November of every year
}
define timeperiod{
timeperiod_name misc-date-ranges
alias Misc Date Ranges
2007-01-01 - 2008-02-01 00:00-24:00 ; January 1st, 2007 to February 1st, 2008
monday 3 - thursday 4 00:00-24:00 ; 3rd Monday to 4th Thursday of every month
day 1 - 15 00:00-24:00 ; 1st to 15th day of every month
day 20 - -1 00:00-24:00 ; 20th to the last day of every month
july 10 - 15 00:00-24:00 ; July 10th to July 15th of every year
april 10 - may 15 00:00-24:00 ; April 10th to May 15th of every year
tuesday 1 april - friday 2 may 00:00-24:00 ; 1st Tuesday in April
; to 2nd Friday in May of every year
}
define timeperiod{
timeperiod_name misc-skip-ranges
alias Misc Skip Ranges
2007-01-01 - 2008-02-01 / 3 00:00-24:00 ; Every 3 days from January 1st, 2007 to February 1st, 2008
2008-04-01 / 7 00:00-24:00 ; Every 7 days from April 1st, 2008 (continuing forever)
monday 3 - thursday 4 / 2 00:00-24:00 ; Every other day from 3rd Monday to 4th Thursday of every month
day 1 - 15 / 5 00:00-24:00 ; Every 5 days from the 1st to the 15th day of every month
july 10 - 15 / 2 00:00-24:00 ; Every other day from July 10th to July 15th of every year
tuesday 1 april - friday 2 may / 6 00:00-24:00 ; Every 6 days from the 1st Tuesday in April
; to the 2nd Friday in May of every year
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>timeperiod_name</strong></span>:</p></td>
<td><p>This directives is the short name used to identify the time period.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>alias</strong></span>:</p></td>
<td><p>This directive is a longer name or description used to identify the time period.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>[weekday]</strong></span>:</p></td>
<td><p>The weekday directives ("<span class="emphasis"><em>sunday</em></span>" through "<span class="emphasis"><em>saturday</em></span>")are comma-delimited
lists of time ranges that are "valid" times for a particular day of the week. Notice that there are seven different days for
which you can define time ranges (Sunday through Saturday). Each time range is in the form of <span class="bold"><strong>HH:MM-HH:MM</strong></span>, where hours are specified on a 24 hour clock. For example, <span class="bold"><strong>00:15-24:00</strong></span> means 12:15am in the morning for this day until 12:00am midnight (a 23 hour, 45 minute total
time range). If you wish to exclude an entire day from the timeperiod, simply do not include it in the timeperiod
definition.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>[exception]</strong></span>:</p></td>
<td><p> You can specify several different types of exceptions to the standard rotating weekday schedule. Exceptions can
take a number of different forms including single days of a specific or generic month, single weekdays in a month, or single
calendar dates. You can also specify a range of days/dates and even specify skip intervals to obtain functionality described by
"every 3 days between these dates". Rather than list all the possible formats for exception strings, we'll let you look at the
example timeperiod definitions above to see what's possible. :-) Weekdays and different types of exceptions all have different
levels of precedence, so its important to understand how they can affect each other. More information on this can be found in
the documentation on <a class="link" href="timeperiods.html" title="5.9. Time Periods">timeperiods</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>exclude</strong></span>:</p></td>
<td><p>This directive is used to specify the short names of other timeperiod definitions whose time ranges should be
excluded from this timeperiod. Multiple timeperiod names should be separated with a comma.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633644560"></a>
<a class="indexterm" name="idm140381633643552"></a>
</div>
<div class="section" title="3.4.8. Command Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="command"></a>3.4.8. <a name="objectdefinitions-command"></a>Command Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A command definition is just that. It defines a command. Commands that can be defined include service checks, service
notifications, service event handlers, host checks, host notifications, and host event handlers. Command definitions can contain <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macros</a>, but you must make sure that you include only those macros that are "valid" for the circumstances when
the command will be used. More information on what macros are available and when they are "valid" can be found <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">here</a>. The different arguments to a command definition are outlined below.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define command{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">command_name</font></span></td>
<td><p>command_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">command_line</font></span></td>
<td><p>command_line</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define command{
command_name check_pop
command_line /usr/local/icinga/libexec/check_pop -H $HOSTADDRESS$
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>command_name</strong></span>:</p></td>
<td><p>This directive is the short name used to identify the command. It is referenced in <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contact</a>, <a class="link" href="objectdefinitions.html#objectdefinitions-host">host</a>, and <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a> definitions (in notification, check, and event handler directives), among
other places.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>command_line</strong></span>:</p></td>
<td>
<p> This directive is used to define what is actually executed by Icinga when the command is used for service
or host checks, notifications, or <a class="link" href="eventhandlers.html" title="7.3. Event Handlers">event handlers</a>. Before the command line is executed, all
valid <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macros</a> are replaced with their respective values. See the documentation on macros for
determining when you can use different macros. Note that the command line is <span class="emphasis"><em>not</em></span> surrounded in quotes.
Also, if you want to pass a dollar sign ($) on the command line, you have to escape it with another dollar sign.</p>
<p><span class="bold"><strong>NOTE</strong></span>: You may not include a <span class="bold"><strong>semicolon</strong></span> (;) in the
<span class="emphasis"><em>command_line</em></span> directive, because everything after it will be ignored as a config file comment. You can work
around this limitation by setting one of the <a class="link" href="macrolist.html#macrolist-user">
<span class="bold"><strong>$USER$</strong></span>
</a> macros in your <a class="link" href="configmain.html#configmain-resource_file">resource file</a> to a semicolon and then referencing the
appropriate $USER$ macro in the <span class="emphasis"><em>command_line</em></span> directive in place of the semicolon.</p> <p>If you want
to pass arguments to commands during runtime, you can use <a class="link" href="macrolist.html#macrolist-arg"><span class="bold"><strong>$ARGn$</strong></span>
macros</a> in the <span class="emphasis"><em>command_line</em></span> directive of the command definition and then separate individual
arguments from the command name (and from each other) using bang (!) characters in the object definition directive (host check
command, service event handler command, etc) that references the command. More information on how arguments in command
definitions are processed during runtime can be found in the documentation on <a class="link" href="macros.html" title="5.2. Understanding Macros and How They Work">macros</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633596576"></a>
<a class="indexterm" name="idm140381633595456"></a>
</div>
<div class="section" title="3.4.9. Servicedependency Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="servicedepdency"></a>3.4.9. <a name="objectdefinitions-servicedependency"></a>Servicedependency Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Service dependencies are an advanced feature of Icinga that allow you to suppress notifications and active checks of
services based on the status of one or more other services. Service dependencies are optional and are mainly targeted at advanced users
who have complicated monitoring setups. More information on how service dependencies work (read this!) can be found <a class="link" href="dependencies.html" title="7.13. Host and Service Dependencies">here</a>.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional. However, you must
supply at least one type of criteria for the definition to be of much use.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define servicedependency{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">dependent_host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>dependent_hostgroup_name</td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>dependent_servicegroup_name</td>
<td><p>servicegroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">dependent_service_description</font></span></td>
<td><p>service_description</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>hostgroup_name</p></td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_description</font></span></td>
<td><p>service_description</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>inherits_parent</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>execution_failure_criteria</p></td>
<td><p>[o,w,u,c,p,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notification_failure_criteria</p></td>
<td><p>[o,w,u,c,p,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>dependency_period</p></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define servicedependency{
host_name WWW1
service_description Apache Web Server
dependent_host_name WWW1
dependent_service_description Main Web Site
execution_failure_criteria n
notification_failure_criteria w,u,c
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a> that the <span class="emphasis"><em>dependent</em></span> service "runs" on or is associated with.
Multiple hosts should be separated by commas. Leaving this directive blank can be used to create <a class="link" href="objecttricks.html#objecttricks-same_host_dependency">"same host" dependencies</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the <span class="emphasis"><em>dependent</em></span> service "runs" on or is
associated with. Multiple hostgroups should be separated by commas. The dependent_hostgroup may be used instead of, or in
addition to, the dependent_host directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_servicegroup_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-servicegroup">servicegroup(s)</a> that the <span class="emphasis"><em>dependent</em></span> services belongs to.
Multiple servicegroups should be separated by commas.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_service_description</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>description</em></span> of the <span class="emphasis"><em>dependent</em></span> <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a> that the service<span class="emphasis"><em> that is being depended upon</em></span> (also referred
to as the master service) "runs" on or is associated with. Multiple hosts should be separated by commas.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">hostgroup(s)</a> that the service<span class="emphasis"><em> that is being depended upon</em></span> (also
referred to as the master service) "runs" on or is associated with. Multiple hostgroups should be separated by commas. The
hostgroup_name may be used instead of, or in addition to, the host_name directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_description</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>description</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a><span class="emphasis"><em> that is being depended upon</em></span> (also referred to as the
master service).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>inherits_parent</strong></span>:</p></td>
<td><p>This directive indicates whether or not the dependency inherits dependencies of the service<span class="emphasis"><em> that is being
depended upon</em></span> (also referred to as the master service). In other words, if the master service is dependent upon other
services and any one of those dependencies fail, this dependency will also fail. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>execution_failure_criteria</strong></span>:</p></td>
<td><p>This directive is used to specify the criteria that determine when the dependent service should
<span class="emphasis"><em>not</em></span> be actively checked. If the <span class="emphasis"><em>master</em></span> service is in one of the failure states we
specify, the <span class="emphasis"><em>dependent</em></span> service will not be actively checked. Valid options are a combination of one or more
of the following (multiple options are separated with commas): <span class="bold"><strong>o</strong></span> = fail on an OK state,
<span class="bold"><strong>w</strong></span> = fail on a WARNING state, <span class="bold"><strong>u</strong></span> = fail on an UNKNOWN state,
<span class="bold"><strong>c</strong></span> = fail on a CRITICAL state, and <span class="bold"><strong>p</strong></span> = fail on a pending state
(e.g. the service has not yet been checked). If you specify <span class="bold"><strong>n</strong></span> (none) as an option, the
execution dependency will never fail and checks of the dependent service will always be actively checked (if other conditions
allow for it to be). Example: If you specify <span class="bold"><strong>o,c,u</strong></span> in this field, the
<span class="emphasis"><em>dependent</em></span> service will not be actively checked if the <span class="emphasis"><em>master</em></span> service is in either an
OK, a CRITICAL, or an UNKNOWN state.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_failure_criteria</strong></span>:</p></td>
<td><p>This directive is used to define the criteria that determine when notifications for the dependent service should
<span class="emphasis"><em>not</em></span> be sent out. If the <span class="emphasis"><em>master</em></span> service is in one of the failure states we specify,
notifications for the <span class="emphasis"><em>dependent</em></span> service will not be sent to contacts. Valid options are a combination of
one or more of the following: <span class="bold"><strong>o</strong></span> = fail on an OK state, <span class="bold"><strong>w</strong></span> =
fail on a WARNING state, <span class="bold"><strong>u</strong></span> = fail on an UNKNOWN state, <span class="bold"><strong>c</strong></span> =
fail on a CRITICAL state, and <span class="bold"><strong>p</strong></span> = fail on a pending state (e.g. the service has not yet been
checked). If you specify <span class="bold"><strong>n</strong></span> (none) as an option, the notification dependency will never fail and
notifications for the dependent service will always be sent out. Example: If you specify <span class="bold"><strong>w</strong></span> in
this field, the notifications for the <span class="emphasis"><em>dependent</em></span> service will not be sent out if the
<span class="emphasis"><em>master</em></span> service is in a WARNING state.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependency_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which this dependency is valid. If this directive is not specified, the dependency is considered to be
valid during all times.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633488368"></a>
<a class="indexterm" name="idm140381633487360"></a>
</div>
<div class="section" title="3.4.10. Serviceescalation Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="serviceescalation"></a>3.4.10. <a name="objectdefinitions-serviceescalation"></a>Serviceescalation Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Service escalations are <span class="emphasis"><em>completely optional</em></span> and are used to escalate notifications for a particular service.
More information on how notification escalations work can be found <a class="link" href="escalations.html" title="7.9. Notification Escalations">here</a>.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Please note that some directives may be inherited from the service definition. For details refer to <a class="link" href="objectinheritance.html#objectinheritance-implied_inheritance" title="7.26.9. Implied Inheritance">implied inheritance</a>.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define serviceescalation{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>hostgroup_name</td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">servicegroup_name</font></span></td>
<td><p>servicegroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_description</font></span></td>
<td><p>service_description</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contacts</font></span></td>
<td><p>contacts</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contact_groups</font></span></td>
<td><p>contactgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">first_notification</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">last_notification</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">notification_interval</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>escalation_period</p></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>escalation_options</p></td>
<td><p>[w,u,c,r]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>escalation_condition</p></td>
<td><p><condition> ( [ & / | ] <condition> )*</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_warning_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>last_warning_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_critical_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>last_critical_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_unknown_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>last_unknown_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define serviceescalation{
host_name nt-3
service_description Processor Load
first_notification 4
last_notification 0
notification_interval 30
contact_groups all-nt-admins,themanagers
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a> that the <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a> escalation
should apply to or is associated with.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the service escalation should apply to or is associated with.
Multiple hostgroups should be separated by commas. The hostgroup_name may be used instead of, or in addition to, the host_name
directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>servicegroup_name</strong></span>:</p></td>
<td><p>This directive is used to specify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-servicegroup">servicegroup(s)</a> that the service escalation should apply to or is associated
with. Multiple servicegroups should be separated by commas. The servicegroup_name may be used instead of, or in addition to, the
service_name directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_description</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>description</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a> the escalation should apply to.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span> notification for which this escalation is
effective. For instance, if you set this value to 3, this escalation will only be used if the service is in a non-OK state long
enough for a third notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>last</em></span> notification for which this escalation is
effective. For instance, if you set this value to 5, this escalation will not be used if more than five notifications are sent
out for the service. Setting this value to 0 means to keep using this escalation entry forever (no matter how many notifications
go out).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contacts</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> that should be notified whenever there are problems (or recoveries) with
this service. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and
don't want to configure <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a>. You must specify at least one
contact or contact group in each service escalation definition.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contact_groups</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact group</a> that should be notified when the service notification is
escalated. Multiple contact groups should be separated by commas. You must specify at least one contact or contact group in each
service escalation definition.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_interval</strong></span>:</p></td>
<td>
<p>This directive is used to determine the interval at which notifications should be made while this escalation is
valid. If you specify a value of 0 for the interval, Icinga will send the first notification when this escalation
definition is valid, but will then prevent any more problem notifications from being sent out for the host. Notifications are
sent out again until the host recovers. This is useful if you want to stop having notifications sent out after a certain amount
of time. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>If multiple escalation entries for a host overlap for one or more notification ranges, the smallest notification
interval from all escalation entries is used.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>escalation_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which this escalation is valid. If this directive is not specified, the escalation is considered to be
valid during all times.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>escalation_options</strong></span>:</p></td>
<td><p>This directive is used to define the criteria that determine when this service escalation is used. The escalation
is used only if the service is in one of the states specified in this directive. If this directive is not specified in a service
escalation, the escalation is considered to be valid during all service states. Valid options are a combination of one or more
of the following: <span class="bold"><strong>r</strong></span> = escalate on an OK (recovery) state, <span class="bold"><strong>w</strong></span> =
escalate on a WARNING state, <span class="bold"><strong>u</strong></span> = escalate on an UNKNOWN state, and <span class="bold"><strong>c</strong></span> = escalate on a CRITICAL state. Example: If you specify <span class="bold"><strong>w</strong></span> in this
field, the escalation will only be used if the service is in a WARNING state. Default: w,u,c,r.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>escalation_condition</strong></span>:</p></td>
<td><p>This directive is completely optional. Details can be found <a class="link" href="escalation_condition.html" title="7.10. Escalation Condition">here</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_warning_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> warning</em></span> notification
for which this escalation is effective. For instance, if you set this value to 3, this escalation will only be used if the
service is in a non-OK state long enough for a third warning notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_warning_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>last</em></span><span class="emphasis"><em> warning</em></span> notification
for which this escalation is effective. For instance, if you set this value to 5, this escalation will not be used if more than
five warning notifications are sent out for the service. Setting this value to 0 means to keep using this escalation entry
forever (no matter how many notifications go out).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_critical_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> critical</em></span>
notification for which this escalation is effective. For instance, if you set this value to 3, this escalation will only be used
if the service is in a non-OK state long enough for a third critical notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_critical_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>last</em></span><span class="emphasis"><em> critical</em></span> notification
for which this escalation is effective. For instance, if you set this value to 5, this escalation will not be used if more than
five critical notifications are sent out for the service. Setting this value to 0 means to keep using this escalation entry
forever (no matter how many notifications go out).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_unknown_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> unknown</em></span> notification
for which this escalation is effective. For instance, if you set this value to 3, this escalation will only be used if the
service is in a non-OK state long enough for a third unknown notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_unknown_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>last</em></span><span class="emphasis"><em> unknown</em></span> notification
for which this escalation is effective. For instance, if you set this value to 5, this escalation will not be used if more than
five unknown notifications are sent out for the service. Setting this value to 0 means to keep using this escalation entry
forever (no matter how many notifications go out).</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633348032"></a>
<a class="indexterm" name="idm140381633347024"></a>
</div>
<div class="section" title="3.4.11. Hostdependency Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="hostdependency"></a>3.4.11. <a name="objectdefinitions-hostdependency"></a>Hostdependency Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Host dependencies are an advanced feature of Icinga that allow you to suppress notifications for hosts based on the status
of one or more other hosts. Host dependencies are optional and are mainly targeted at advanced users who have complicated monitoring
setups. More information on how host dependencies work (read this!) can be found <a class="link" href="dependencies.html" title="7.13. Host and Service Dependencies">here</a>.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define hostdependency{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">dependent_host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>dependent_hostgroup_name</td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>hostgroup_name</td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>inherits_parent</p></td>
<td><p>[0/1]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>execution_failure_criteria</p></td>
<td><p>[o,d,u,p,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notification_failure_criteria</p></td>
<td><p>[o,d,u,p,n]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>dependency_period</p></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define hostdependency{
host_name WWW1
dependent_host_name DBASE1
notification_failure_criteria d,u
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the
<span class="emphasis"><em>dependent</em></span><a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a>. Multiple hosts should be separated by
commas.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependent_hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the
<span class="emphasis"><em>dependent</em></span><a class="link" href="objectdefinitions.html#objectdefinitions-host">hostgroup(s)</a>. Multiple hostgroups should be
separated by commas. The dependent_hostgroup_name may be used instead of, or in addition to, the dependent_host_name
directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host(s)</a><span class="emphasis"><em> that is being depended upon</em></span> (also referred to as the master
host). Multiple hosts should be separated by commas.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">hostgroup(s)</a><span class="emphasis"><em> that is being depended upon</em></span> (also referred to as the
master host). Multiple hostgroups should be separated by commas. The hostgroup_name may be used instead of, or in addition to,
the host_name directive.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>inherits_parent</strong></span>:</p></td>
<td><p>This directive indicates whether or not the dependency inherits dependencies of the host<span class="emphasis"><em> that is being
depended upon</em></span> (also referred to as the master host). In other words, if the master host is dependent upon other hosts
and any one of those dependencies fail, this dependency will also fail. Default: 0.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>execution_failure_criteria</strong></span>:</p></td>
<td><p>This directive is used to specify the criteria that determine when the dependent host should
<span class="emphasis"><em>not</em></span> be actively checked. If the <span class="emphasis"><em>master</em></span> host is in one of the failure states we
specify, the <span class="emphasis"><em>dependent</em></span> host will not be actively checked. Valid options are a combination of one or more of
the following (multiple options are separated with commas): <span class="bold"><strong>o</strong></span> = fail on an UP state, <span class="bold"><strong>d</strong></span> = fail on a DOWN state, <span class="bold"><strong>u</strong></span> = fail on an UNREACHABLE state, and
<span class="bold"><strong>p</strong></span> = fail on a pending state (e.g. the host has not yet been checked). If you specify <span class="bold"><strong>n</strong></span> (none) as an option, the execution dependency will never fail and the dependent host will always be
actively checked (if other conditions allow for it to be). Example: If you specify <span class="bold"><strong>u,d</strong></span> in this
field, the <span class="emphasis"><em>dependent</em></span> host will not be actively checked if the <span class="emphasis"><em>master</em></span> host is in either
an UNREACHABLE or DOWN state.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_failure_criteria</strong></span>:</p></td>
<td><p>This directive is used to define the criteria that determine when notifications for the dependent host should
<span class="emphasis"><em>not</em></span> be sent out. If the <span class="emphasis"><em>master</em></span> host is in one of the failure states we specify,
notifications for the <span class="emphasis"><em>dependent</em></span> host will not be sent to contacts. Valid options are a combination of one
or more of the following: <span class="bold"><strong>o</strong></span> = fail on an UP state, <span class="bold"><strong>d</strong></span> = fail on
a DOWN state, <span class="bold"><strong>u</strong></span> = fail on an UNREACHABLE state, and <span class="bold"><strong>p</strong></span> = fail
on a pending state (e.g. the host has not yet been checked). If you specify <span class="bold"><strong>n</strong></span> (none) as an
option, the notification dependency will never fail and notifications for the dependent host will always be sent out. Example:
If you specify <span class="bold"><strong>d</strong></span> in this field, the notifications for the <span class="emphasis"><em>dependent</em></span> host
will not be sent out if the <span class="emphasis"><em>master</em></span> host is in a DOWN state.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>dependency_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which this dependency is valid. If this directive is not specified, the dependency is considered to be
valid during all times.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633263392"></a>
<a class="indexterm" name="idm140381633262512"></a>
</div>
<div class="section" title="3.4.12. Hostescalation Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="hostescalation"></a>3.4.12. <a name="objectdefinitions-hostescalation"></a>Hostescalation Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Host escalations are <span class="emphasis"><em>completely optional</em></span> and are used to escalate notifications for a particular host. More
information on how notification escalations work can be found <a class="link" href="escalations.html" title="7.9. Notification Escalations">here</a>.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Please note that some directives may be inherited from the host definition. For details refer to <a class="link" href="objectinheritance.html#objectinheritance-implied_inheritance" title="7.26.9. Implied Inheritance">implied inheritance</a>.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define hostescalation{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td>hostgroup_name</td>
<td>hostgroup_name</td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contacts</font></span></td>
<td>contacts</td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">contact_groups</font></span></td>
<td>contactgroup_name</td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">first_notification</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">last_notification</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">notification_interval</font></span></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>escalation_period</p></td>
<td><p>timeperiod_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>escalation_options</p></td>
<td><p>[d,u,r]</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_down_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>last_down_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>first_unreachable_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>last_unreachable_notification</p></td>
<td><p>#</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define hostescalation{
host_name router-34
first_notification 5
last_notification 8
notification_interval 60
contact_groups all-router-admins
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host</a> that the escalation should apply to.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the escalation should apply to. Multiple hostgroups should be
separated by commas. If this is used, the escalation will apply to all hosts that are members of the specified
hostgroup(s).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span> notification for which this escalation is
effective. For instance, if you set this value to 3, this escalation will only be used if the host is down or unreachable long
enough for a third notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>last</em></span> notification for which this escalation is
effective. For instance, if you set this value to 5, this escalation will not be used if more than five notifications are sent
out for the host. Setting this value to 0 means to keep using this escalation entry forever (no matter how many notifications go
out).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contacts</strong></span>:</p></td>
<td><p>This is a list of the <span class="emphasis"><em>short names</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contact">contacts</a> that should be notified whenever there are problems (or recoveries) with
this host. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and
don't want to configure <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact groups</a>. You must specify at least one
contact or contact group in each host escalation definition.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>contact_groups</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-contactgroup">contact group</a> that should be notified when the host notification is escalated.
Multiple contact groups should be separated by commas. You must specify at least one contact or contact group in each host
escalation definition.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notification_interval</strong></span>:</p></td>
<td>
<p>This directive is used to determine the interval at which notifications should be made while this escalation is
valid. If you specify a value of 0 for the interval, Icinga will send the first notification when this escalation
definition is valid, but will then prevent any more problem notifications from being sent out for the host. Notifications are
sent out again until the host recovers. This is useful if you want to stop having notifications sent out after a certain amount
of time. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>If multiple escalation entries for a host overlap for one or more notification ranges, the smallest notification
interval from all escalation entries is used.</p>
</td></tr>
</table></div>
</td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>escalation_period</strong></span>:</p></td>
<td><p>This directive is used to specify the short name of the <a class="link" href="objectdefinitions.html#objectdefinitions-timeperiod">time
period</a> during which this escalation is valid. If this directive is not specified, the escalation is considered to be
valid during all times.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>escalation_options</strong></span>:</p></td>
<td><p>This directive is used to define the criteria that determine when this host escalation is used. The escalation is
used only if the host is in one of the states specified in this directive. If this directive is not specified in a host
escalation, the escalation is considered to be valid during all host states. Valid options are a combination of one or more of
the following: <span class="bold"><strong>r</strong></span> = escalate on an UP (recovery) state, <span class="bold"><strong>d</strong></span> =
escalate on a DOWN state, and <span class="bold"><strong>u</strong></span> = escalate on an UNREACHABLE state. Example: If you specify
<span class="bold"><strong>d</strong></span> in this field, the escalation will only be used if the host is in a DOWN state. Default:
d,u,r.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_down_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> down</em></span> notification
for which this escalation is effective. For instance, if you set this value to 3, this escalation will only be used if the host
is in a non-OK state long enough for a third down notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_down_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> down</em></span> notification
for which this escalation is effective. For instance, if you set this value to 5, this escalation will not be used if more than
five down notifications are sent out for the host. Setting this value to 0 means to keep using this escalation entry forever (no
matter how many notifications go out).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>first_unreachable_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> unreachable</em></span>
notification for which this escalation is effective. For instance, if you set this value to 3, this escalation will only be used
if the host is in a non-OK state long enough for a third unreachable notification to go out.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>last_unreachable_notification</strong></span>:</p></td>
<td><p>This directive is a number that identifies the <span class="emphasis"><em>first</em></span><span class="emphasis"><em> unreachable</em></span>
notification for which this escalation is effective. For instance, if you set this value to 5, this escalation will not be used
if more than five unreachable notifications are sent out for the host. Setting this value to 0 means to keep using this
escalation entry forever (no matter how many notifications go out).</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633155808"></a>
<a class="indexterm" name="idm140381633154800"></a>
</div>
<div class="section" title="3.4.13. Hostextinfo Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="hostextinfo"></a>3.4.13. <a name="objectdefinitions-hostextinfo"></a>Hostextinfo Definition</h3></div></div></div>
<div class="important" title="Important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top">
<p>This definition type is deprecated and may be removed in the future. Please use the directives in the host definition
instead.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Extended host information entries are basically used to make the output from the <a class="link" href="cgis.html#cgis-status_cgi">status</a>,
<a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a>, and <a class="link" href="cgis.html#cgis-extinfo_cgi">extinfo</a> CGIs look pretty. They have no
effect on monitoring and are completely optional.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional. However, you need to
supply at least one optional variable in each definition for it to be of much use.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define hostextinfo{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>hostgroup_name</p></td>
<td>note_string</td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td>note_string</td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td>url</td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td>url</td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image</p></td>
<td>image_file</td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image_alt</p></td>
<td>alt_string</td>
</tr>
<tr>
<td><p></p></td>
<td><p>statusmap_image</p></td>
<td>image_file</td>
</tr>
<tr>
<td><p></p></td>
<td><p>2d_coords</p></td>
<td>x_coord,y_coord</td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define hostextinfo{
host_name netware1
notes This is the primary Netware file server
notes_url http://webserver.localhost.localdomain/hostinfo.pl?host=netware1
icon_image novell40.png
icon_image_alt IntranetWare 4.11
statusmap_image novell40.gd2
2d_coords 100,250
}</pre>
<p><span class="emphasis"><em>Variable Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This variable is used to identify the <span class="emphasis"><em>short name</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-host">host</a> which the data is associated with.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the definition should apply to. Multiple hostgroups should be
separated by commas. If this is used, the definition will apply to all hosts that are members of the specified
hostgroup(s).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the host. If you specify a note here,
you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information
about the specified host).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td><p>This variable is used to define an optional URL that can be used to provide more information about the host. If you
specify an URL, you will see a link that says "Extra Host Notes" in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGI (when you are viewing information about the specified host). Any valid URL can be used. If you plan on
using relative paths, the base path will the the same as what is used to access the CGIs (i.e.
<span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to make detailed information on the host, emergency
contact methods, etc. available to other support staff.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
host. If you specify an URL, you will see a link that says "Extra Host Actions" in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGI (when you are viewing information about the specified host). Any valid URL can be used. If you plan on
using relative paths, the base path will the the same as what is used to access the CGIs (i.e.
<span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this host. This
image will be displayed in the <a class="link" href="cgis.html#cgis-status_cgi">status</a> and <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGIs. The image will look best if it is 40x40 pixels in size. Images for hosts are assumed to be in the
<span class="bold"><strong>logos/</strong></span> subdirectory in your HTML images directory (i.e.
<span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image_alt</strong></span>:</p></td>
<td><p>This variable is used to define an optional string that is used in the ALT tag of the image specified by the
<span class="emphasis"><em><icon_image></em></span> argument. The ALT tag is used in the <a class="link" href="cgis.html#cgis-status_cgi">status</a>,
<a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> and <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a>
CGIs.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>statusmap_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of an image that should be associated with this host in the <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a> CGI. You can specify a JPEG, PNG, and GIF image if you want, although we would
strongly suggest using a GD2 format image, as other image formats will result in a lot of wasted CPU time when the statusmap
image is generated. GD2 images can be created from PNG images by using the <span class="bold"><strong>pngtogd2</strong></span> utility
supplied with Thomas Boutell's <a class="link" href="http://www.boutell.com/gd/" target="_top">gd library</a>. The GD2 images should be created
in <span class="emphasis"><em>uncompressed</em></span> format in order to minimize CPU load when the statusmap CGI is generating the network map
image. The image will look best if it is 40x40 pixels in size. You can leave these option blank if you are not using the
statusmap CGI. Images for hosts are assumed to be in the <span class="bold"><strong>logos/</strong></span> subdirectory in your HTML
images directory (i.e. <span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>2d_coords</strong></span>:</p></td>
<td>
<p>This variable is used to define coordinates to use when drawing the host in the <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a> CGI. Coordinates should be given in positive integers, as they correspond to
physical pixels in the generated image. The origin for drawing (0,0) is in the upper left hand corner of the image and extends
in the positive x direction (to the right) along the top of the image and in the positive y direction (down) along the left hand
side of the image. For reference, the size of the icons drawn is usually about 40x40 pixels (text takes a little extra space).
The coordinates you specify here are for the upper left hand corner of the host icon that is drawn. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Don't worry about what the maximum x and y coordinates that you can use are. The CGI will automatically calculate the
maximum dimensions of the image it creates based on the largest x and y coordinates you specify.</p>
</td></tr>
</table></div>
</td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381633068064"></a>
<a class="indexterm" name="idm140381633066960"></a>
</div>
<div class="section" title="3.4.14. Serviceextinfo Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="serviceextinfo"></a>3.4.14. <a name="objectdefinitions-serviceextinfo"></a>Serviceextinfo Definition</h3></div></div></div>
<div class="important" title="Important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.png"></td>
<th align="left">Important</th>
</tr>
<tr><td align="left" valign="top">
<p>This definition type is deprecated and may be removed in the future. Please use the directives in the service definition
instead.</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>Extended service information entries are basically used to make the output from the <a class="link" href="cgis.html#cgis-status_cgi">status</a>
and <a class="link" href="cgis.html#cgis-extinfo_cgi">extinfo</a> CGIs look pretty. They have no effect on monitoring and are completely
optional.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional. However, you need to
supply at least one optional variable in each definition for it to be of much use.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define serviceextinfo{</p></td></tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">host_name</font></span></td>
<td><p>host_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><span class="color"><font color="red">service_description</font></span></td>
<td><p>service_description</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>hostgroup_name</p></td>
<td><p>hostgroup_name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes</p></td>
<td><p>note_string</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>notes_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>action_url</p></td>
<td><p>url</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image</p></td>
<td><p>image_file</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>icon_image_alt</p></td>
<td><p>alt_string</p></td>
</tr>
<tr>
<td><p> </p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definition:</em></span></p>
<pre class="screen"> define serviceextinfo{
host_name linux2
service_description Log Anomalies
notes Security-related log anomalies on secondary Linux server
notes_url http://webserver.localhost.localdomain/serviceinfo.pl?host=linux2&service=Log+Anomalies
icon_image security.png
icon_image_alt Security-Related Alerts
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>host_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name</em></span> of the host that the <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a> is associated with.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>service_description</strong></span>:</p></td>
<td><p>This directive is description of the <a class="link" href="objectdefinitions.html#objectdefinitions-service">service</a> which the data is
associated with.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>hostgroup_name</strong></span>:</p></td>
<td><p>This directive is used to identify the <span class="emphasis"><em>short name(s)</em></span> of the <a class="link" href="objectdefinitions.html#objectdefinitions-hostgroup">hostgroup(s)</a> that the definition should apply to. Multiple hostgroups should be
separated by commas. If this is used, the definition will apply to all hosts that are members of the specified
hostgroup(s).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes</strong></span>:</p></td>
<td><p>This directive is used to define an optional string of notes pertaining to the service. If you specify a note here,
you will see the it in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information
about the specified service).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>notes_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more information about the service. If
you specify an URL, you will see a link that says "Extra Service Notes" in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGI (when you are viewing information about the specified service). Any valid URL can be used. If you plan on
using relative paths, the base path will the the same as what is used to access the CGIs (i.e.
<span class="emphasis"><em>/cgi-bin/icinga/</em></span>). This can be very useful if you want to make detailed information on the service,
emergency contact methods, etc. available to other support staff.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>action_url</strong></span>:</p></td>
<td><p>This directive is used to define an optional URL that can be used to provide more actions to be performed on the
service. If you specify an URL, you will see a link that says "Extra Service Actions" in the <a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> CGI (when you are viewing information about the specified service). Any
valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs
(i.e. <span class="emphasis"><em>/cgi-bin/icinga/</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image</strong></span>:</p></td>
<td><p>This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this host. This
image will be displayed in the <a class="link" href="cgis.html#cgis-status_cgi">status</a> and <a class="link" href="cgis.html#cgis-extinfo_cgi">extended
information</a> CGIs. The image will look best if it is 40x40 pixels in size. Images for hosts are assumed to be in the
<span class="bold"><strong>logos/</strong></span> subdirectory in your HTML images directory (i.e.
<span class="emphasis"><em>/usr/local/icinga/share/images/logos</em></span>).</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>icon_image_alt</strong></span>:</p></td>
<td><p>This variable is used to define an optional string that is used in the ALT tag of the image specified by the
<span class="emphasis"><em><icon_image></em></span> argument. The ALT tag is used in the <a class="link" href="cgis.html#cgis-status_cgi">status</a>,
<a class="link" href="cgis.html#cgis-extinfo_cgi">extended information</a> and <a class="link" href="cgis.html#cgis-statusmap_cgi">statusmap</a>
CGIs.</p></td>
</tr>
</tbody>
</table>
</div>
<a class="indexterm" name="idm140381632990272"></a>
<a class="indexterm" name="idm140381632989088"></a>
</div>
<div class="section" title="3.4.15. Module Definition">
<div class="titlepage"><div><div><h3 class="title">
<a name="module"></a>3.4.15. <a name="objectdefinitions-module"></a>Module Definition</h3></div></div></div>
<p><span class="emphasis"><em>Description:</em></span></p>
<p>A module definition is used to specify information about a module.</p>
<p><span class="emphasis"><em>Definition Format:</em></span></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p><span class="color"><font color="red">"Directives"</font></span> are required while the others are optional.</p>
</td></tr>
</table></div>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr><td colspan="3" align="left" valign="middle"><p>define module{</p></td></tr>
<tr>
<td><p> </p></td>
<td><p><span class="color"><font color="red">module_name</font></span></p></td>
<td><p>module name</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p><span class="color"><font color="red">path</font></span></p></td>
<td><p>path</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>args</p></td>
<td><p>arguments</p></td>
</tr>
<tr>
<td><p></p></td>
<td><p>module_type</p></td>
<td><p>neb</p></td>
</tr>
<tr>
<td><p></p></td>
<td colspan="2" align="left" valign="middle"><p>}</p></td>
</tr>
</tbody>
</table>
</div>
<p><span class="emphasis"><em>Example Definitions:</em></span></p>
<pre class="screen"> define module{
module_name ido_mod
path /usr/local/icinga/lib/idomod.so
module_type neb
args config_file=/usr/local/icinga/etc/idomod.cfg
}</pre>
<p>Based on the <a class="link" href="http://mathias-kettner.de/checkmk_livestatus.html" target="_top">MKLiveStatus</a> documentation the module
definition would look like this:</p>
<pre class="screen"> define module{
module_name mklivestatus
path /usr/local/lib/mk-livestatus/livestatus.o
module_type neb
args /var/lib/nagios/rw/live
}</pre>
<p><span class="emphasis"><em>Directive Descriptions:</em></span></p>
<div class="informaltable">
<table border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>module_name</strong></span>:</p></td>
<td><p>This directive identifies the unique name of the module so you cannot have two modules with the same module name.
It is mandatory, otherwise the config will not be accepted and the module will not be loaded.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>module_type</strong></span>:</p></td>
<td><p>This optional directive defines the type of the module, e.g. 'neb' for event broker modules. This directive is
intended to allow further filtering on the module loading.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>path</strong></span>:</p></td>
<td><p>This mandatory directive specifies the path to the module binary to be loaded. For event broker modules like idomod
the user running the core must be allowed to read and load the module.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><span class="bold"><strong>args</strong></span>:</p></td>
<td><p>This directive defines optional arguments passed to the module. idomod needs config_file=.../idomod.cfg while other
modules have their own syntax. This directive is passed as argument string to the event broker module loader if used as neb
module.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Templating should be possible but it has not been tested extensively with Icinga 1.4.</p>
</td></tr>
</table></div>
<a class="indexterm" name="idm140381632944272"></a>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="configobject.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="customobjectvars.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">3.3. Object Configuration Overview </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> 3.5. Custom Object Variables</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|