Skip to content

Instantly share code, notes, and snippets.

Datadog
Industry standards: practical monitoring sre notes
Datadog Backend: sas in the cloud
Datadog agent, where is it installed?
- for k8s is in all nodes, using helm chart override taken from https://github.com/DataDog/helm-charts/blob/main/charts/datadog/README.md
For vms it is installed with Ansible on each vm
please note, one thing is the agent and another the related instrumentation in the app for APM
Why monitoring?
Proactive monitoring
@damaya
damaya / generic-steps.txt
Created July 31, 2019 15:07
How to use ez 5 controllers from legacy code
https://gist.github.com/lolautruche/5694727
AdminController.php
<?php
/**
* AcmeTestBundle/Controller/AdminController.php
*/
namespace Acme\TestBundle\Controller;
use eZ\Bundle\EzPublishCoreBundle\Controller;
@damaya
damaya / Doc Refs
Created June 13, 2019 15:46
Elastic Search Cool References
https://qbox.io/blog/practical-guide-elasticsearch-scoring-relevancy
@damaya
damaya / sorting arrays
Created March 22, 2019 17:02
sorting arrays
https://www.codepunker.com/blog/3-solutions-for-multidimensional-array-sorting-by-child-keys-or-values-in-PHP
@damaya
damaya / install_opnshift.sh
Last active March 2, 2019 22:44 — forked from mauricios/install_openshift.sh
Install OpenShift in Amazon Linux 2
# Configure variables
OPENSHIFT_PACKAGE=https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz
OPENSHIFT_HOSTNAME=openshift.xip.io
# Install Docker
sudo yum install docker -y
sudo usermod -aG docker ec2-user
# Add insecure registry to Docker
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Debug\Debug;
// Ensure UTF-8 is used in string operations
setlocale(LC_CTYPE, 'C.UTF-8');
// Environment is taken from "SYMFONY_ENV" variable, if not set, defaults to "prod"
$environment = getenv('SYMFONY_ENV');
@damaya
damaya / curl_time_format.txt
Created December 18, 2018 12:51 — forked from mauricios/curl_time_format.txt
CURL format file to summarize loading times results of a page
Content Type: %{content_type}\n
HTTP Code: %{http_code}\n
HTTP Connect: %{http_connect}\n
Number Connects: %{num_connects}\n
Number Redirects: %{num_redirects}\n
Redirect URL: %{redirect_url}\n
Size Download: %{size_download}\n
Average speed download: %{speed_download}\n
Size Upload: %{size_upload}\n
SSL Verify: %{ssl_verify_result}\n
<If "%{HTTP_HOST} == 'www.domain.com.co'">
RedirectMatch 301 (?i)/matchpart http://anyotherdomain.co/path
</If>
Check https://perishablepress.com/case-insensitive-redirectmatch/
@damaya
damaya / gist:cd5fcd91a88e18b56e14cdf7e6722c9a
Last active August 21, 2018 22:44
Using overblog for graphql with star wars example
From Resources/config/graphql/Query.types.yml
human:
type: "Human"
args:
id:
description: "id of the human"
type: "String!"
resolve: "@=resolver('character_human', [args])"
droid:
type: "Droid"
@damaya
damaya / gist:8eeab3c7b7b22741d896a6c50b7008ed
Created August 29, 2017 12:48
Check openssl connection between machines
https://www.cyberciti.biz/faq/test-ssl-certificates-diagnosis-ssl-certificate/