I want to cut costs on my development environment. Now my environment works 24 hours, but in fact it is used only a couple of hours a day. I would like to make my environment work only 8 hours a day, and if there are no requests there, it will be minimized to 0 until a request arrives. I would like that when requesting a link to my environment, it would restore work. Tell me how to do this? A general purpose, Scale to Zero component for Kubernetes when in's not using.
James M's questions
Tell me whether it is possible to make a separation by severity in stackdriver. All messages in the container are displayed in stderror and in stackdriver, they are marked as errors. The task is to separate messages from logs (laravel) into categories information, error, warning.
Google Kubernetes Engine + Stackdriver logging enabled.
Help is needed. I want to make alarms if the site gives 401 502 and so on, errors. On the server is an agent who sends different pieces in the datadog. There is such module http_check, and at it like as there is such function.
http_response_status_code - A string or Python regular expression for an HTTP status code. This check will report DOWN for any status code that does not match. This defaults to 1xx, 2xx and 3xx HTTP status codes. For example: 401 or 4\d\d
Here is my http_check.yml
init_config:
instances:
- name: My first service
url: https://example.com
collect_response_time: true
timeout: 1
skip_event: true
http_response_status_code: 502
check_certificate_expiration: true
disable_ssl_validation: false
days_warning: 7
days_critical: 3
tags:
- url:example.com
- env:production
Actually I try to shut down nginx and watch that it would send the status. I do not see anything. The task in general is to monitor the sites and alert if something has fallen off.