Skip to content

Instantly share code, notes, and snippets.

View arush-sal's full-sized avatar
🏍️
riding

Arush Salil arush-sal

🏍️
riding
View GitHub Profile
@arush-sal
arush-sal / HelloWorld.java
Created June 16, 2018 22:59
As found at kubernauts/prometheus_example/springboot/instrumented/
package com.github.kubernauts.prometheus_example.springboot.instrumented;
import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.web.bind.annotation.*;
// import the Prometheus packages.
import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector;
// Prometheus counter package.
import io.prometheus.client.Counter;
@arush-sal
arush-sal / pom.xml
Created June 16, 2018 22:38
As found in prometheus_example/springboot/instrumented/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kubernauts</groupId>
<artifactId>prometheus_example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
@arush-sal
arush-sal / HelloWorld.java
Created June 16, 2018 21:39
As found in github.com/kubernauts/prometheus_example/tree/master/springboot/uninstrumented
// Define code's package
package com.github.kubernauts.prometheus_example.springboot.uninstrumented;
// import the default Spring Boot packages
import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.web.bind.annotation.*;
// Declare the Standard Spring boot annotation for instantiation
@SpringBootApplication
@arush-sal
arush-sal / pom.xml
Last active June 17, 2018 01:54
As found at github.com/kubernauts/prometheus_example/springboot/uninstrumented/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.kubernauts</groupId>
<artifactId>prometheus_example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>

Keybase proof

I hereby claim:

  • I am arush-sal on github.
  • I am salil (https://keybase.io/salil) on keybase.
  • I have a public key ASDaIXog3sq8M35iH5JaLgdez3d2WzkiT1-KyS-s2u1MrAo

To claim this, I am signing this object:

@arush-sal
arush-sal / gist:332d9910cadbd89f0e0f49f6d274520f
Last active August 16, 2016 13:37
fail2ban basic config for port 22
#
# WARNING: heavily refactored in 0.9.0 release. Please review and
# customize settings for your setup.
#
# Changes: in most of the cases you should not modify this
# file, but provide customizations in jail.local file,
# or separate .conf files under jail.d/ directory, e.g.:
#
# HOW TO ACTIVATE JAILS:
#