Advertisement
jkister

Untitled

Mar 10th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. # assuming your "primary" box is called "primary" with ip addr 10.0.0.10
  2. # and your secondary box "secondary" with ip addr 10.0.0.11
  3.  
  4. ####### in "secondary" config
  5. darp_mode: distributed
  6. DARP "secondary" {
  7. master "primary" {
  8. frequency: 1m
  9. hostname: 10.0.0.11
  10. secret: password
  11. }
  12. }
  13.  
  14.  
  15.  
  16. ######## in "primary" config
  17. darp_mode: distributed
  18. darp_tags: primary
  19. darp_graph_location: master
  20.  
  21.  
  22. DARP "primary" {
  23. slave "secondary" {
  24. hostname: 10.0.0.11
  25. secret: password
  26. remote_url: http://10.0.0.11/
  27. }
  28. }
  29.  
  30. # primary monitors "datacenter1", secondary monitors "datacenter2"
  31. Group "servers-distributed" {
  32. Group "datacenter1" {
  33. darp_tags: primary
  34. Host "server1" {
  35. Service Ping
  36. }
  37. }
  38. Group "datacenter2" {
  39. darp_tags: secondary
  40. Host "server1" {
  41. Service Ping
  42. }
  43. }
  44. }
  45.  
  46. # primary & secondary monitor redundantly. if either detect a problem, alarm
  47. Group "servers-redundant" {
  48. darp_mode: redundant
  49. darp_tags: primary secondary
  50. Group "datacenter1" {
  51. Host "server1" {
  52. Service Ping
  53. }
  54. }
  55. Group "datacenter2" {
  56. Host "server1" {
  57. Service Ping
  58. }
  59. }
  60. }
  61.  
  62. # more of a mixed mode
  63. Group "servers" {
  64. Group "datacenter1" {
  65. # alert if any argus cant connect to db
  66. Host "database" {
  67. darp_mode: redundant
  68. darp_tags: primary secondary
  69. Service Ping
  70. }
  71. # only monitor local logging server by primary argus server.
  72. Host "loghost" {
  73. darp_tags: primary
  74. Service Ping
  75. }
  76. }
  77. Group "datacenter2" {
  78. # monitor local logging server by secondary argus server
  79. darp_tags: secondary
  80. Service Ping
  81. }
  82. }
  83.  
  84.  
  85. Group "self" {
  86. graph: yes
  87. darp_mode: redundant
  88. darp_tags: primary secondary
  89. Service Self/idle {
  90. label: busy
  91. uname: busy
  92. title: Percent Busy
  93. calc: ave-rate
  94. scale: 0.01
  95. }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement