Skip to content

Commit

Permalink
Merge pull request #816 from ministryofjustice/oasys-adjust-maintenan…
Browse files Browse the repository at this point in the history
…ce-message-checks

oasys adjust maintenance message checks
  • Loading branch information
wullub authored May 30, 2024
2 parents 322a05f + 2e38352 commit 0be34b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ansible/group_vars/server_type_oasys_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ collectd_monitored_services_servertype:
- metric_name: service_status_app
metric_dimension: tomcat-healthcheck
shell_cmd: "service tomcat status"
- metric_name: service_status_app
metric_dimension: maintenance-msg
shell_cmd: "[ $( date -r /u01/app/apache/tomcat/latest/webapps/ROOT/maintenance_message.html '+%Y%m%d%H%M' ) -gt $(date -d '1 hour ago' +'%Y%m%d%H%M') ]"

collectd_script_user: oracle
1 change: 0 additions & 1 deletion ansible/roles/oasys-ords/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ oasys_ords_extra_files:
- "index_message.html"
- "index_no_message.html"
oasys_ords_s3_bucket: "hmpps/oasys-ords"
oasys_maintenance_msg: ""
ords_db_port: 1521
ords_db_sid: "{{ ec2.tags['oracle-db-sid'] }}"
oasys_ords_dir: "/u02/stage/ORDS/ords_stage"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/oasys-ords/tasks/files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
- name: update maintenance message
ansible.builtin.cron:
name: "maintenance_message"
minute: "*/2" # every 10 mins
minute: "*/10" # every 10 mins
user: root
job: "su oracle -c '{{ oasys_ords_get_maintenance_msg_command }} > {{ oasys_ords_maintenance_message_file }}'"

0 comments on commit 0be34b6

Please sign in to comment.