Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rabbitmq monitoring #45

Open
wants to merge 3 commits into
base: mk/4028-change-celery-backend
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 57 additions & 54 deletions environments/production/vault.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,58 @@
$ANSIBLE_VAULT;1.1;AES256
34376162313939646634643964346539383930623061623264646635376162363466316138303637
3737373166653364646239393937316665663835383530650a316265346536393137373266386537
39363862356564356532626435623239373632383133356535636165336532633130376137316237
6464373531633631640a363436333633336264356565396561313566613362373530643333646333
33313236333133303535336331626339386136323266663966643064623235666534303437366266
62376538616366323064356337666563623231353530393934633137666265323066313363376164
64643464343531336130346466376339623265636530656661353861663530343533316535373264
37653063323936616366376664643931393830613464313533343331333730353530383239323034
37656237303939343164343865636166663362326339383133653637306336363835646562333365
31653835666135346366313566396336306632653438616563396565346635636562363664346336
34626265663266366166346438326238663866396536626561663630336635343336333038353666
32663431323933376634343432353833346138333061363665383438646664636438346433336164
33353862623534363766393936343432623436623163656137376631346561393166653531613033
30363739626439376363393438346230653765663131383237383861613233646237623332623063
32613939353031323031633333376239626562616135626437633330363664653035623237393963
32613866613934646336333435393861363835656632613961386334633863313236323063623465
32376637356262366435623534653064646261373632303962373531366231653832333539323830
66396233396130373137346566646235363339626132666235333965323065326463633735393063
63626239656565623238633765333866666532626232343435316334316462323864396639613530
39326139343061386666366361613731376635653135623531343934313735633961393734323539
37356361643237656339343938303431663834316261353164616333303536316137353839393161
35316239663466346139386334333834343638346433363563326136373365353037313530653635
30643132373965353730363534663363623236333033643661373336333963636533663737323535
64313666366362616661376533613530313330303364343135353538666437383363616430626535
63643465626466643066663363306338333935316166333038323734623338656466383930626234
33653961663031326561303465396566393836346431633135383938653063626364386363343431
61616664646364663761336133323134336437623762353966396231343564663737316263323666
34666531303261623664643732303162356162323261643765356636396334386264653139306238
38626266313833333332343539376164663136383932666364333039616563633664313038373339
37646665666438346266353466623363636561383262343333303563633633653032336138633130
38366632326131363936313938643030643066613765353066363038303264633130323032386634
31633839333333323665306563616162396133633363643263396338663363666336316162333765
36343966363234346165396663343262613236663934613935643866353363333430613064633131
33363235373861323864343631636330356332383064393532353734356637646564303434656438
64353033336365396464633033633332643833343636633866393463326662636335363336663236
65613965316631396438383062396131323236343261656261343931663339623233633466333536
65343464323033393065303235303166343831373938393164653734323035633631346332343137
38386236376264356138666232633232623662383337663030353537343037376533626231323062
36316232303564653333616630306232633431386664646265343534633362323433653761643830
39343637373966346134363137393930656137333431393434313130343235303565386236346539
37613439383366636536313366636430346666373636613666336536383066626461666432613766
38373462653536613831376166376132356131383434373832666236376661356138366133373861
62303161653562356663366436306530316366343930636430653165653931633362323137383936
31306136623239653961306564666466333266396563666161643930616139383135643366333664
36313163396437323237666564653532646531363536333232666564646338393630333235313030
32663665303333363538303235316565663961303336353835636232396238356131363865646438
63323361356532623533616463626464316339643265646461363432306561373139353266366466
36303535323431393866663432343666363130336239323663313639623962636165393564306632
32353737343531336230663234313438393465646233346338333531316237353835646163353332
32343631356137656431303361326635626464376565383531383265396539303038363834613562
39316233333137343962653630636362343962663135626434316462623237383430303638616331
65326334666263343631326136373832616636643331656133336238326562666363343839393834
30636532666461333465386130653639393032633933636337636132356133613130663834636438
6365366338383264343566396432326532303366353562396633
38306333323332626135616431366339353564336631303661323333393031353136346262363064
3362336137613731656562346163383839323639633334610a353133316434633263356630303761
38643235303564613063643234363863613064633161333066343334663462343061336334316436
3132336638646666390a363035633663656134346136636231346131373536303264333838626165
63646261656661636362633264663764656130326134373331373466366362323737393365333663
35633663643262663139396135633935363264303539623435333763336666356332663231623161
39353265623966323635626165326133356161303932343864326138313836346334303739383636
37333465323830636233663130306431663366623131383964373832383133326664323230336563
61323132333133353733306134623866646532356364643236613533363834656334663636396666
30393539323964333034346133666230353064626165303232303338393339633062333839366164
34396466613839303766633735383165356162663765666338653661626536303634306235393865
65386238346663383563623735316539366535373061643236653038353433366562366239633333
36616436346332376334626139313935663533313730323861333865633364306430336335303266
34353335373836396132643066373833313739656537656430623765613363386430373262613631
33363435343865646462353239666132313565306666393936383462363631653163646132653931
39633839316537333266393565396638623530396530666566326665653233383866336264303163
32353630616361633739386562613733383339373064636463336565613534373736356561353661
32626433326334326534333366366333313438653065393737633362336639616137356362396465
33343765353163393437363535666465633138626231616164343063613133363364323239366163
33383934306335396266646337393036643132343031306465663230353134366263323835316666
30373461643338383437316532636365626163373332336262306638306637393034366261313636
63333838343637333334303764343531366262313038336563326261343466303437616330353239
30363365623432303438326139616262363135373330356562323137636263323964303863353464
36353334636337633064636233313634616135386165356637373332616462373733303431353961
30313134373364343034363033313433626439623434656163656639333132336233356436303737
64363936636464643431353332643538653366383133366434633536313639383464396631656133
30323761633339373833353033366333633965313164306164613434316532303564333339663733
36653162383936383765353130356137613939346339663764306266346662626131613733623964
31373435663065343534623338393962323133343566393830313863323730373361383962396131
37386561363637363865333363623135333934623763316236326565373766623861613234393030
30393963373338323730616162666531643737646165383835373032623163633262346230646165
39643161636436303466313862633837393565663936616463313265663035316336316666316235
62333265653530343165353262626565316232376437373539343061373631393236623338633435
63393434383932653834636634646636353765623063663862383633343332643539353866616231
38366336336536663537643738376266353463643332373262613131653630643532343634353463
61333862333535346366323866663931353964663731356265613538343132376634313364663633
36656134383538336663343037616332326337636531376162363233353534643334616139333339
32663337333733386236616265316461663333326135326235383534316164396330353634386532
32666436663035393231656135343861663931383836326565343236383866323836356666653333
61346265363936626236373138623830633538653165373937636566656238663130356233333933
33343430353837653861353438366338643465363532613233356136623831363061636435616435
39633537333562616135623732633538363039653237333936643336663934363232333030663233
65313033353166316261656239326339353666306330656438303366376364343735323739363835
66306661336230663265616361636132356134313762363832333130636262353337636238653538
37386261636236653066613062353334613038306239316239613336373031663836633965343531
63643165653232396239393638636463643962646436646165613633343736346239386261336366
36323464336238653135633765313832373236303065643964373537353435363130623832663537
61626536396261333236623538316137396635633239623263393761633334393863643435393866
33303139313936376634326166633237643765303935346531353561313162383765636238373832
35383438626465343366363865666236383963313932303731333237656638616536366330663833
30666261663234633461363361666430373736633137616231646630313330376537643166373238
66646665613731636236366538633061306637373565383338326365646630383435623061646636
39363136626634373262623834653339306332303465316533616436616530396232646635323835
37313762663831313265646561323733666334333936343239363863376437316334346432363632
61326132633532653565633732383938346337626661326531366636623330386461363164323634
33336139363966663437613835303238323635636364366562353466326534313964653134643033
3865
9 changes: 9 additions & 0 deletions roles/commcare_analytics/tasks/datadog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
mode: 0640
tags: datadog

- name: Add rabbitmq config
template:
src: "datadog/rabbitmq.yaml.j2"
dest: "/etc/datadog-agent/conf.d/rabbitmq.d/conf.yaml"
owner: dd-agent
group: dd-agent
mode: 0640
tags: datadog

- name: Restart Datadog service
ansible.builtin.service:
name: datadog-agent
Expand Down
9 changes: 9 additions & 0 deletions roles/commcare_analytics/tasks/rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
ignore_errors: '{{ ansible_check_mode }}'
tags: rabbitmq

- name: Enable rabbitmq plugins
rabbitmq_plugin:
names: rabbitmq_management
state: enabled
ignore_errors: '{{ ansible_check_mode }}'
notify:
- restart rabbitmq
tags: rabbitmq

- name: Place config file
template:
src: rabbitmq/rabbitmq.conf.j2
Expand Down
12 changes: 12 additions & 0 deletions roles/commcare_analytics/templates/datadog/rabbitmq.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# {{ ansible_managed }}
#
init_config:

instances:
- rabbitmq_api_url: http://localhost:15672/api/
rabbitmq_user: {{ rabbitmq_user }}
rabbitmq_pass: {{ rabbitmq_password }}
tags:
- instance:{{ datadog.hostname }}
skip_proxy: true
2 changes: 1 addition & 1 deletion roles/commcare_analytics/templates/datadog/redisdb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ instances:
- host: localhost
port: 6379
tags:
- instance: {{ datadog.hostname }}
- instance:{{ datadog.hostname }}