Skip to content

Instantly share code, notes, and snippets.

View mikepea's full-sized avatar

Mike Pountney mikepea

View GitHub Profile
@mikepea
mikepea / exit0_sensu_playbook.md
Last active August 29, 2015 14:10
'Exit 0' Playbook

'Exit 0' Sensu Check Playbook

'exit 0' is a very base level check. It's really just confirming that Sensu's shell interpreter is working in a reasonable manner.

It should be crazy quick, so we run it every 10s, to then graph its performance via other means later.

@mikepea
mikepea / pg.md
Created November 20, 2014 23:48
PostgreSQL Playbook

PostgreSQL Playbook

@mikepea
mikepea / udevd.md
Last active August 29, 2015 14:10
udevd Playbook
@mikepea
mikepea / logstash_redis.md
Last active August 29, 2015 14:10
Logstash Redis Playbook

Logstash Redis Playbook

This monitors the length of the logstash:beaver queue in redis, via the community logstash-queue-length plugin.

If this queue is growing, it implies logstash or one of its 'downstream outputs' is not processing log in a timely manner, or not at all.

Quite often, it's because ES has failed, or logstash process has died.

It can also mean though that your log processing is too much for the server to handle. Check resource graphs.

@mikepea
mikepea / process_states.md
Last active August 29, 2015 14:10
Process State Playbook

Process State Playbook

Zombies!!!

Zombie processes are created when a child process dies, but due to the parent being blocked cannot provide the exit code back, and hence does not yet get reaped by the kernel.

They are visible in the process table with a 'Z' status.

@mikepea
mikepea / packmon_user_stories_1.md
Last active August 29, 2015 14:10
Monitoring Pack User Stories v1

Monitoring Pack User Stories

Front-end web developer

As a front-end webdev
I would like visibility of which browsers are in use
@mikepea
mikepea / gearman_monitoring.md
Last active August 29, 2015 14:11
Monitoring Gearman

Monitoring Gearman

Number of jobs in the queue

# Should be an integer if queue is present and gearman running.
@mikepea
mikepea / pr_etiquette.md
Last active April 14, 2024 14:29
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@mikepea
mikepea / gist:511ebb8b723f69cea3a4
Created January 12, 2015 11:01
ElasticSearch output of _nodes/stats?pretty -- for analysis of why heap needs to be over 2GB.
{
"cluster_name" : "elasticsearch",
"nodes" : {
"REDACTED" : {
"timestamp" : 1421060315273,
"name" : "monitoring-02",
"transport_address" : "inet[/REDACTED:9300]",
"host" : "monitoring-02",
"ip" : [ "inet[/REDACTED:9300]", "NONE" ],
"indices" : {
@mikepea
mikepea / create_zombie.c
Created February 13, 2015 13:14
C program to create a zombie process - useful for testing monitoring.
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main ()
{
pid_t child_pid;
child_pid = fork ();
if (child_pid > 0) {