Advertisement
JoaquinHF

cgi.cfg

Aug 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.79 KB | None | 0 0
  1. #################################################################
  2. #
  3. # CGI.CFG - Sample CGI Configuration File for Nagios 4.4.4
  4. #
  5. #
  6. #################################################################
  7.  
  8.  
  9. # MAIN CONFIGURATION FILE
  10. # This tells the CGIs where to find your main configuration file.
  11. # The CGIs will read the main and host config files for any other
  12. # data they might need.
  13.  
  14. main_config_file=/usr/local/nagios/etc/nagios.cfg
  15.  
  16.  
  17.  
  18. # PHYSICAL HTML PATH
  19. # This is the path where the HTML files for Nagios reside. This
  20. # value is used to locate the logo images needed by the statusmap
  21. # and statuswrl CGIs.
  22.  
  23. physical_html_path=/usr/local/nagios/share
  24.  
  25.  
  26.  
  27. # URL HTML PATH
  28. # This is the path portion of the URL that corresponds to the
  29. # physical location of the Nagios HTML files (as defined above).
  30. # This value is used by the CGIs to locate the online documentation
  31. # and graphics. If you access the Nagios pages with an URL like
  32. # http://www.myhost.com/nagios, this value should be '/nagios'
  33. # (without the quotes).
  34.  
  35. url_html_path=/nagios
  36.  
  37.  
  38.  
  39. # CONTEXT-SENSITIVE HELP
  40. # This option determines whether or not a context-sensitive
  41. # help icon will be displayed for most of the CGIs.
  42. # Values: 0 = disables context-sensitive help
  43. # 1 = enables context-sensitive help
  44.  
  45. show_context_help=0
  46.  
  47.  
  48.  
  49. # PENDING STATES OPTION
  50. # This option determines what states should be displayed in the web
  51. # interface for hosts/services that have not yet been checked.
  52. # Values: 0 = leave hosts/services that have not been check yet in their original state
  53. # 1 = mark hosts/services that have not been checked yet as PENDING
  54.  
  55. use_pending_states=1
  56.  
  57.  
  58.  
  59. # AUTHENTICATION USAGE
  60. # This option controls whether or not the CGIs will use any
  61. # authentication when displaying host and service information, as
  62. # well as committing commands to Nagios for processing.
  63. #
  64. # Read the HTML documentation to learn how the authorization works!
  65. #
  66. # NOTE: It is a really *bad* idea to disable authorization, unless
  67. # you plan on removing the command CGI (cmd.cgi)! Failure to do
  68. # so will leave you wide open to kiddies messing with Nagios and
  69. # possibly hitting you with a denial of service attack by filling up
  70. # your drive by continuously writing to your command file!
  71. #
  72. # Setting this value to 0 will cause the CGIs to *not* use
  73. # authentication (bad idea), while any other value will make them
  74. # use the authentication functions (the default).
  75.  
  76. use_authentication=1
  77.  
  78.  
  79.  
  80. # x509 CERT AUTHENTICATION
  81. # When enabled, this option allows you to use x509 cert (SSL)
  82. # authentication in the CGIs. This is an advanced option and should
  83. # not be enabled unless you know what you're doing.
  84.  
  85. use_ssl_authentication=0
  86.  
  87.  
  88.  
  89. # DEFAULT USER
  90. # Setting this variable will define a default user name that can
  91. # access pages without authentication. This allows people within a
  92. # secure domain (i.e., behind a firewall) to see the current status
  93. # without authenticating. You may want to use this to avoid basic
  94. # authentication if you are not using a secure server since basic
  95. # authentication transmits passwords in the clear.
  96. #
  97. # Important: Do not define a default username unless you are
  98. # running a secure web server and are sure that everyone who has
  99. # access to the CGIs has been authenticated in some manner! If you
  100. # define this variable, anyone who has not authenticated to the web
  101. # server will inherit all rights you assign to this user!
  102.  
  103. #default_user_name=guest
  104.  
  105.  
  106.  
  107. # SYSTEM/PROCESS INFORMATION ACCESS
  108. # This option is a comma-delimited list of all usernames that
  109. # have access to viewing the Nagios process information as
  110. # provided by the Extended Information CGI (extinfo.cgi). By
  111. # default, *no one* has access to this unless you choose to
  112. # not use authorization. You may use an asterisk (*) to
  113. # authorize any user who has authenticated to the web server.
  114.  
  115. authorized_for_system_information=adminnagios
  116.  
  117.  
  118.  
  119. # CONFIGURATION INFORMATION ACCESS
  120. # This option is a comma-delimited list of all usernames that
  121. # can view ALL configuration information (hosts, commands, etc).
  122. # By default, users can only view configuration information
  123. # for the hosts and services they are contacts for. You may use
  124. # an asterisk (*) to authorize any user who has authenticated
  125. # to the web server.
  126.  
  127. authorized_for_configuration_information=adminnagios
  128.  
  129.  
  130.  
  131. # SYSTEM/PROCESS COMMAND ACCESS
  132. # This option is a comma-delimited list of all usernames that
  133. # can issue shutdown and restart commands to Nagios via the
  134. # command CGI (cmd.cgi). Users in this list can also change
  135. # the program mode to active or standby. By default, *no one*
  136. # has access to this unless you choose to not use authorization.
  137. # You may use an asterisk (*) to authorize any user who has
  138. # authenticated to the web server.
  139.  
  140. authorized_for_system_commands=adminnagios
  141.  
  142.  
  143.  
  144. # GLOBAL HOST/SERVICE VIEW ACCESS
  145. # These two options are comma-delimited lists of all usernames that
  146. # can view information for all hosts and services that are being
  147. # monitored. By default, users can only view information
  148. # for hosts or services that they are contacts for (unless you
  149. # you choose to not use authorization). You may use an asterisk (*)
  150. # to authorize any user who has authenticated to the web server.
  151.  
  152. authorized_for_all_services=adminnagios
  153. authorized_for_all_hosts=adminnagios
  154.  
  155.  
  156.  
  157. # GLOBAL HOST/SERVICE COMMAND ACCESS
  158. # These two options are comma-delimited lists of all usernames that
  159. # can issue host or service related commands via the command
  160. # CGI (cmd.cgi) for all hosts and services that are being monitored.
  161. # By default, users can only issue commands for hosts or services
  162. # that they are contacts for (unless you you choose to not use
  163. # authorization). You may use an asterisk (*) to authorize any
  164. # user who has authenticated to the web server.
  165.  
  166. authorized_for_all_service_commands=adminnagios
  167. authorized_for_all_host_commands=adminnagios
  168.  
  169.  
  170.  
  171. # READ-ONLY USERS
  172. # A comma-delimited list of usernames that have read-only rights in
  173. # the CGIs. This will block any service or host commands normally shown
  174. # on the extinfo CGI pages. It will also block comments from being shown
  175. # to read-only users.
  176.  
  177. #authorized_for_read_only=user1
  178.  
  179.  
  180.  
  181. # STATUSMAP BACKGROUND IMAGE
  182. # This option allows you to specify an image to be used as a
  183. # background in the statusmap CGI. It is assumed that the image
  184. # resides in the HTML images path (i.e. /usr/local/nagios/share/images).
  185. # This path is automatically determined by appending "/images"
  186. # to the path specified by the 'physical_html_path' directive.
  187. # Note: The image file may be in GIF, PNG, JPEG, or GD2 format.
  188. # However, I recommend that you convert your image to GD2 format
  189. # (uncompressed) but ONLY IF YOU WILL USE THE LEGACY MAP EXCLUSIVELY,
  190. # as this will cause less CPU load when the CGI generates the image.
  191.  
  192. #statusmap_background_image=smbackground.gd2
  193.  
  194.  
  195.  
  196. # STATUSMAP TRANSPARENCY INDEX COLOR
  197. # These options set the r,g,b values of the background color used the statusmap CGI,
  198. # so normal browsers that can't show real png transparency set the desired color as
  199. # a background color instead (to make it look pretty).
  200. # Defaults to white: (R,G,B) = (255,255,255).
  201.  
  202. #color_transparency_index_r=255
  203. #color_transparency_index_g=255
  204. #color_transparency_index_b=255
  205.  
  206.  
  207.  
  208. # DEFAULT STATUSMAP LAYOUT METHOD
  209. # This option allows you to specify the default layout method
  210. # the statusmap CGI should use for drawing hosts. If you do
  211. # not use this option, the default for the legacy map is to use
  212. # user-defined coordinates and the default for the new map is "6"
  213. # (Circular Balloon).
  214. # Valid options for the legacy map are as follows:
  215. # 0 = User-defined coordinates
  216. # 1 = Depth layers
  217. # 2 = Collapsed tree
  218. # 3 = Balanced tree
  219. # 4 = Circular
  220. # 5 = Circular (Marked Up)
  221. # Valid options for the new map are as follows:
  222. # 0 = User-defined coordinates
  223. # 1 = Depth Layers (Horizontal)
  224. # 2 = Collapsed tree (Horizontal)
  225. # 3 = Balanced tree (Horizontal)
  226. # 4 = DON'T USE
  227. # 5 = Circular Markup
  228. # 6 = Circular Balloon
  229. # 7 = Balanced tree (Vertical)
  230. # 8 = Collapsed tree (Vertical)
  231. # 9 = Depth Layers (Vertical)
  232. # 10 = Force Map
  233.  
  234. #default_statusmap_layout=6
  235.  
  236.  
  237.  
  238. # DEFAULT STATUSWRL LAYOUT METHOD
  239. # This option allows you to specify the default layout method
  240. # the statuswrl (VRML) CGI should use for drawing hosts. If you
  241. # do not use this option, the default is to use user-defined
  242. # coordinates. Valid options are as follows:
  243. # 0 = User-defined coordinates
  244. # 2 = Collapsed tree
  245. # 3 = Balanced tree
  246. # 4 = Circular
  247.  
  248. default_statuswrl_layout=4
  249.  
  250.  
  251.  
  252. # STATUSWRL INCLUDE
  253. # This option allows you to include your own objects in the
  254. # generated VRML world. It is assumed that the file
  255. # resides in the HTML path (i.e. /usr/local/nagios/share).
  256.  
  257. #statuswrl_include=myworld.wrl
  258.  
  259.  
  260.  
  261. # PING SYNTAX
  262. # This option determines what syntax should be used when
  263. # attempting to ping a host from the WAP interface (using
  264. # the statuswml CGI. You must include the full path to
  265. # the ping binary, along with all required options. The
  266. # $HOSTADDRESS$ macro is substituted with the address of
  267. # the host before the command is executed.
  268. # Please note that the syntax for the ping binary is
  269. # notorious for being different on virtually ever *NIX
  270. # OS and distribution, so you may have to tweak this to
  271. # work on your system.
  272.  
  273. ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
  274.  
  275.  
  276.  
  277. # REFRESH RATE
  278. # This option allows you to specify the refresh rate in seconds
  279. # of various CGIs (status, statusmap, extinfo, and outages).
  280.  
  281. refresh_rate=30
  282.  
  283.  
  284.  
  285. # PAGE TOUR
  286. # Enable page tour for helpful tips and tricks on various pages
  287.  
  288. #enable_page_tour=1
  289.  
  290.  
  291.  
  292. # DEFAULT PAGE LIMIT
  293. # This option allows you to specify the default number of results
  294. # displayed on the status.cgi. This number can be adjusted from
  295. # within the UI after the initial page load. Setting this to 0
  296. # will show all results.
  297.  
  298. result_limit=100
  299.  
  300.  
  301.  
  302. # ESCAPE HTML TAGS
  303. # This option determines whether HTML tags in host and service
  304. # status output is escaped in the web interface. If enabled,
  305. # your plugin output will not be able to contain clickable links.
  306.  
  307. escape_html_tags=1
  308.  
  309.  
  310.  
  311. # SOUND OPTIONS
  312. # These options allow you to specify an optional audio file
  313. # that should be played in your browser window when there are
  314. # problems on the network. The audio files are used only in
  315. # the status CGI. Only the sound for the most critical problem
  316. # will be played. Order of importance (higher to lower) is as
  317. # follows: unreachable hosts, down hosts, critical services,
  318. # warning services, and unknown services. If there are no
  319. # visible problems, the sound file optionally specified by
  320. # 'normal_sound' variable will be played.
  321. #
  322. #
  323. # <varname>=<sound_file>
  324. #
  325. # Note: All audio files must be placed in the /media subdirectory
  326. # under the HTML path (i.e. /usr/local/nagios/share/media/).
  327.  
  328. #host_unreachable_sound=hostdown.wav
  329. #host_down_sound=hostdown.wav
  330. #service_critical_sound=critical.wav
  331. #service_warning_sound=warning.wav
  332. #service_unknown_sound=warning.wav
  333. #normal_sound=noproblem.wav
  334.  
  335.  
  336.  
  337. # URL TARGET FRAMES
  338. # These options determine the target frames in which notes and
  339. # action URLs will open.
  340.  
  341. action_url_target=_blank
  342. notes_url_target=_blank
  343.  
  344.  
  345.  
  346. # LOCK AUTHOR NAMES OPTION
  347. # This option determines whether users can change the author name
  348. # when submitting comments, scheduling downtime. If disabled, the
  349. # author names will be locked into their contact name, as defined in Nagios.
  350. # Values: 0 = allow editing author names
  351. # 1 = lock author names (disallow editing)
  352.  
  353. lock_author_names=1
  354.  
  355.  
  356.  
  357. # SPLUNK INTEGRATION OPTIONS
  358. # These options allow you to enable integration with Splunk
  359. # in the web interface. If enabled, you'll be presented with
  360. # "Splunk It" links in various places in the CGIs (log file,
  361. # alert history, host/service detail, etc). Useful if you're
  362. # trying to research why a particular problem occurred.
  363. # For more information on Splunk, visit http://www.splunk.com/
  364.  
  365. # This option determines whether the Splunk integration is enabled
  366. # Values: 0 = disable Splunk integration
  367. # 1 = enable Splunk integration
  368.  
  369. #enable_splunk_integration=1
  370.  
  371. # This option should be the URL used to access your instance of Splunk
  372. #splunk_url=http://127.0.0.1:8000/
  373.  
  374.  
  375.  
  376. # NAVIGATION BAR SEARCH OPTIONS
  377. # The following options allow to configure the navbar search. Default
  378. # is to search for hostnames. With enabled navbar_search_for_addresses,
  379. # the navbar search queries IP addresses as well. It's also possible
  380. # to enable search for aliases by setting navbar_search_for_aliases=1.
  381.  
  382. navbar_search_for_addresses=1
  383. navbar_search_for_aliases=1
  384.  
  385.  
  386.  
  387. # DEFAULTS FOR CHECKBOXES FOR ACKNOWLEDGEMENTS
  388. # Enabling ack_no_sticky will default the "Sticky Acknowledgement" to
  389. # be unchecked.
  390. # Enabling ack_no_send will default the "Send Notification" to
  391. # be unchecked.
  392.  
  393. #ack_no_sticky=0
  394. #ack_no_send=0
  395.  
  396.  
  397.  
  398. # SHOW ONLY HARD STATES IS TACTICAL OVERVIEW
  399. # This option controls whether only HARD states are counted on the
  400. # Tactical Overview, or if both HARD and SOFT states are counted.
  401. # Set to 1 to show only HARD states. Defaults to 0 (HARD+SOFT).
  402.  
  403. #tac_cgi_hard_only=0
  404.  
  405.  
  406.  
  407. # COMMAND COMMENTS
  408. # These options control whether or not comments are required, optional,
  409. # or not allowed for specific commands. The format for each line is:
  410. # cmd-name=req,def-comment
  411. #
  412. # cmd-name is "CMT_" plus a command such as ADD_HOST_COMMENT
  413. # req 0 = not allowed, 1 = optional, 2 = required
  414. # def-comment optional default comment that will be put in the input field
  415. #
  416. # The following examples override the default comment requirements in
  417. # some way.
  418.  
  419. #CMT_ADD_HOST_COMMENT=1
  420. #CMT_ACKNOWLEDGE_HOST_PROBLEM=2,"Problem is being looked into"
  421. #CMT_SCHEDULE_SVC_CHECK=1
  422. #CMT_SCHEDULE_HOST_DOWNTIME=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement