Giter Club home page Giter Club logo

graph-canary's Introduction

graph-canary

Dashboard for canary endpoints

Running / Deploying

Running with docker

Clone to your hard drive:

git clone https://github.com/MartinBechtle/graph-canary

In your deployment pipeline you should override the configuration in

src/main/resources

If you need to run in multiple environments, you can create multiple files in such folder, by choosing a profile name for each. For example, you could create the following files:

src/main/resources/application-dev.yml
src/main/resources/application-prod.yml

Note: do not use a profile called 'test' as it will mess up with the application's bootstrap. In fact, such profile is used for unit and integration tests in this project.

Finally, you can build a docker image that will contain your custom configuration:

docker build . -t martinb86/graphcanary:latest 

Feel free to customise the image name and tag in a way that best suits your organisation. Once the image is uploaded to your registry, you can run with different profiles depending on the environment where you deploy.

docker run -e SPRING_PROFILES_ACTIVE=prod -p 8080:8080 martinb86/graphcanary:latest

Running natively

Steps:

  • Make sure you have JRE 8
  • Customise application.yaml
  • Run with IntelliJ as a Spring Boot application, or run with the embedded gradle dist:
./gradlew bootRun

Setting up email

Enabling

To enable email notifications, just specify the recipient in your application.yaml

canary:
 email:
  to: [email protected]
  from: [email protected]

Configuring

Here is an example of setting up in your application.yaml with Amazon SES (simple email service)

 mail:
  host: email-smtp.us-west-2.amazonaws.com
  username: username
  password: password
  properties:
    mail:
      transport:
        protocol: smtp
      smtp:
        port: 25
        auth: true
        starttls:
          enable: true
          required: true

For further examples, such as using with Gmail, please refer to Spring's documentation or the guide on Baeldung:

Troubleshooting

If weird duplication of services occurs, check your configuration. When configuring the canary endpoints, make sure that you give them the correct name, IE it needs to correspond to the service name that the canary endpoint returns.

Logging levels

If you wish to have more insight into which emails are being sent or what responses you are getting from the canaries, you can use something like this in the config:

logging.level.com.martinbechtle.graphcanary:
  email: DEBUG
  monitor:
    CanaryHttpClient: TRACE

You can refer to the Spring framework's documentation for clarifications on logging levels, but essentially you prefix the config with logging.level and then put fully qualified names of specific java packages or individual classes you want to customise the log level.

graph-canary's People

Contributors

martinbechtle avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.