SHARE
TWEET

Untitled

n1ght3r Feb 4th, 2016 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /opt/omd/sites/prod/etc/nsca/send_nsca.cfg
  2. -----------------------------------------------
  3.  
  4.  
  5. ####################################################
  6. # NSCA Client Config File
  7. ####################################################
  8.  
  9.  
  10. # ENCRYPTION PASSWORD
  11. # This is the password/passphrase that should be used to encrypt the
  12. # outgoing packets.  Note that the nsca daemon must use the same
  13. # password when decrypting the packet!
  14. # IMPORTANT: You don't want all the users on this system to be able
  15. # to read the password you specify here, so make sure to set
  16. # restrictive permissions on this config file!
  17.  
  18. password=omd-secret
  19.  
  20.  
  21.  
  22. # ENCRYPTION METHOD
  23. # This option determines the method by which the send_nsca client will
  24. # encrypt the packets it sends to the nsca daemon.  The encryption
  25. # method you choose will be a balance between security and performance,
  26. # as strong encryption methods consume more processor resources.
  27. # You should evaluate your security needs when choosing an encryption
  28. # method.
  29. #
  30. # Note: The encryption method you specify here must match the
  31. #       decryption method the nsca daemon uses (as specified in
  32. #       the nsca.cfg file)!!
  33. # Values:
  34. #       0 = None        (Do NOT use this option)
  35. #   1 = Simple XOR  (No security, just obfuscation, but very fast)
  36. #
  37. #   2 = DES
  38. #   3 = 3DES (Triple DES)
  39. #       4 = CAST-128
  40. #       5 = CAST-256
  41. #       6 = xTEA
  42. #       7 = 3WAY
  43. #       8 = BLOWFISH
  44. #       9 = TWOFISH
  45. #       10 = LOKI97
  46. #       11 = RC2
  47. #       12 = ARCFOUR
  48. #
  49. #       14 = RIJNDAEL-128
  50. #       15 = RIJNDAEL-192
  51. #       16 = RIJNDAEL-256
  52. #
  53. #       19 = WAKE
  54. #       20 = SERPENT
  55. #
  56. #       22 = ENIGMA (Unix crypt)
  57. #       23 = GOST
  58. #       24 = SAFER64
  59. #       25 = SAFER128
  60. #       26 = SAFER+
  61. #
  62.  
  63. encryption_method=1
  64.  
  65.  
  66.  
  67. /opt/omd/sites/prod/etc/nsca/nsca.cfg
  68. ----------------------------------------
  69. ####################################################
  70. # NSCA Daemon Config File
  71. ####################################################
  72.  
  73.  
  74. # PID FILE
  75. # The name of the file in which the NSCA daemon should write it's process ID
  76. # number.  The file is only written if the NSCA daemon is started by the root
  77. # user as a single- or multi-process daemon.
  78.  
  79. pid_file=/omd/sites/prod/tmp/run/nsca.pid
  80.  
  81.  
  82.  
  83. # PORT NUMBER
  84. # Port number we should wait for connections on.
  85. # This must be a non-priveledged port (i.e. > 1024).
  86. #
  87. # Not used while NSCA is called by xinetd
  88. server_port=5667
  89.  
  90.  
  91.  
  92. # SERVER ADDRESS
  93. # Address that NSCA has to bind to in case there are
  94. # more as one interface and we do not want NSCA to bind
  95. # (thus listen) on all interfaces.
  96.  
  97. #server_address=192.168.1.1
  98.  
  99.  
  100.  
  101. # NSCA USER
  102. # This determines the effective user that the NSCA daemon should run as.  
  103. # You can either supply a username or a UID.
  104. #
  105. # NOTE: This option is ignored if NSCA is running under either inetd or xinetd
  106.  
  107. nsca_user=prod
  108.  
  109.  
  110.  
  111. # NSCA GROUP
  112. # This determines the effective group that the NSCA daemon should run as.  
  113. # You can either supply a group name or a GID.
  114. #
  115. # NOTE: This option is ignored if NSCA is running under either inetd or xinetd
  116.  
  117. nsca_group=prod
  118.  
  119.  
  120.  
  121. # NSCA CHROOT
  122. # If specified, determines a directory into which the nsca daemon
  123. # will perform a chroot(2) operation before dropping its privileges.
  124. # for the security conscious this can add a layer of protection in
  125. # the event that the nagios daemon is compromised.  
  126. #
  127. # NOTE: if you specify this option, the command file will be opened
  128. #       relative to this directory.
  129.  
  130. #nsca_chroot=/var/run/nagios/rw
  131. # DEBUGGING OPTION
  132. # This option determines whether or not debugging
  133. # messages are logged to the syslog facility.
  134. # Values: 0 = debugging off, 1 = debugging on
  135.  
  136. debug=1
  137.  
  138.  
  139.  
  140. # COMMAND FILE
  141. # This is the location of the Nagios command file that the daemon
  142. # should write all service check results that it receives.
  143.  
  144. command_file=/omd/sites/prod/tmp/run/nagios.cmd
  145.  
  146.  
  147. # ALTERNATE DUMP FILE
  148. # This is used to specify an alternate file the daemon should
  149. # write service check results to in the event the command file
  150. # does not exist.  It is important to note that the command file
  151. # is implemented as a named pipe and only exists when Nagios is
  152. # running.  You may want to modify the startup script for Nagios
  153. # to dump the contents of this file into the command file after
  154. # it starts Nagios.  Or you may simply choose to ignore any
  155. # check results received while Nagios was not running...
  156.  
  157. #alternate_dump_file=/omd/sites/prod/tmp/nsca.dump
  158.  
  159.  
  160.  
  161. # AGGREGATED WRITES OPTION
  162. # This option determines whether or not the nsca daemon will
  163. # aggregate writes to the external command file for client
  164. # connections that contain multiple check results.  If you
  165. # are queueing service check results on remote hosts and
  166. # sending them to the nsca daemon in bulk, you will probably
  167. # want to enable bulk writes, as this will be a bit more
  168. # efficient.
  169. # Values: 0 = do not aggregate writes, 1 = aggregate writes
  170.  
  171. aggregate_writes=1
  172.  
  173.  
  174.  
  175. # APPEND TO FILE OPTION
  176. # This option determines whether or not the nsca daemon will
  177. # will open the external command file for writing or appending.
  178. # This option should almost *always* be set to 0!
  179. # Values: 0 = open file for writing, 1 = open file for appending
  180.  
  181. append_to_file=0
  182. # MAX PACKET AGE OPTION
  183. # This option is used by the nsca daemon to determine when client
  184. # data is too old to be valid.  Keeping this value as small as
  185. # possible is recommended, as it helps prevent the possibility of
  186. # "replay" attacks.  This value needs to be at least as long as
  187. # the time it takes your clients to send their data to the server.
  188. # Values are in seconds.  The max packet age cannot exceed 15
  189. # minutes (900 seconds).  If this variable is set to zero (0), no
  190. # packets will be rejected based on their age.
  191.  
  192. max_packet_age=30
  193.  
  194.  
  195.  
  196. # DECRYPTION PASSWORD
  197. # This is the password/passphrase that should be used to descrypt the
  198. # incoming packets.  Note that all clients must encrypt the packets
  199. # they send using the same password!
  200. # IMPORTANT: You don't want all the users on this system to be able
  201. # to read the password you specify here, so make sure to set
  202. # restrictive permissions on this config file!
  203.  
  204. password=omd-secret
  205.  
  206.  
  207.  
  208. # DECRYPTION METHOD
  209. # This option determines the method by which the nsca daemon will
  210. # decrypt the packets it receives from the clients.  The decryption
  211. # method you choose will be a balance between security and performance,
  212. # as strong encryption methods consume more processor resources.
  213. # You should evaluate your security needs when choosing a decryption
  214. # method.
  215. #
  216. # Note: The decryption method you specify here must match the
  217. #       encryption method the nsca clients use (as specified in
  218. #       the send_nsca.cfg file)!!
  219. # Values:
  220. #
  221. #       0 = None        (Do NOT use this option)
  222. #   1 = Simple XOR  (No security, just obfuscation, but very fast)
  223. #
  224. #   2 = DES
  225. #   3 = 3DES (Triple DES)
  226. #       4 = CAST-128
  227. #       5 = CAST-256
  228. #       6 = xTEA
  229. #       7 = 3WAY
  230. #       8 = BLOWFISH
  231. #       9 = TWOFISH
  232. #       10 = LOKI97
  233. #       11 = RC2
  234. #       12 = ARCFOUR
  235. #
  236. #       14 = RIJNDAEL-128
  237. #       15 = RIJNDAEL-192
  238. #       16 = RIJNDAEL-256
  239. #
  240. #       19 = WAKE
  241. #       20 = SERPENT
  242. #
  243. #       22 = ENIGMA (Unix crypt)
  244. #       23 = GOST
  245. #       24 = SAFER64
  246. #       25 = SAFER128
  247. #       26 = SAFER+
  248. #
  249.  
  250. decryption_method=1
  251.  
  252.  
  253. Command on nagios server
  254. -----------
  255. echo "blackbox;Powerful_backup;2;Problem" | /opt/omd/sites/prod/bin/send_nsca -H localhost -p 5667 -d ";" -c /opt/omd/sites/prod/etc/nsca/send_nsca.cfg
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top