Git Product home page Git Product logo

kuvasz's Introduction

Kuvasz

CI codecov FOSSA Status CodeFactor Latest Release Gitter DockerHub


ℹ️ What is Kuvasz?

Kuvasz is a headless uptime monitor service, which means that it is able to watch all of your precious websites and notifies you if something bad happens to them. It is built in Kotlin, on top of the awesome Micronaut framework. There are a lot of exciting, new features on the roadmap, you should check them out here.

Where does the name come from?

Kuvasz (pronounce as [ˈkuvɒs]) is an ancient hungarian breed of livestock & guard dog. You can read more about them on Wikipedia.

Features

  • Uptime & latency monitoring with a configurable interval
  • SSL certification monitoring (once a day)
  • Email notifications through SMTP
  • Slack notifications through webhoooks
  • Telegram notifications through the Bot API
  • PagerDuty integration with automatic incident resolution
  • Configurable data retention period

Future ideas 🚧

  • Regular Lighthouse audits for your websites

⚡️ Quick start guide

Requirements

  • You have a running PostgreSQL instance (Preferably 12+)

Starting Kuvasz

The quickest way to spin up an instance of Kuvasz is something like this:

docker run -p 8080:8080 \
-e ADMIN_USER=admin \
-e ADMIN_PASSWORD=ThisShouldBeVeryVerySecure \
-e DATABASE_HOST=127.0.0.1 \
-e DATABASE_PORT=5432 \
-e DATABASE_NAME=your_database \
-e DATABASE_USER=your_db_user \
-e DATABASE_PASSWORD=OhThisIsSoSecure \
-e JWT_SIGNATURE_SECRET=testSecretItsVeryVerySecretSecret \
kuvaszmonitoring/kuvasz:latest

At this point you shouldn't see any error in your logs, so you're able to create your first monitor with an API call. Please, take a look at the API section of the Wiki, to get familiar with the authentication method that Kuvasz provides. If you have a valid access token, then creating a monitor and scheduling an uptime check for it, is simple like that:

curl --location --request POST 'https://your.host:8080/monitors/' \
--header 'Authorization: Bearer YourAccessToken' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "my_first_monitor",
    "url": "https://website.to.check",
    "uptimeCheckInterval": 60
}'

You can read more about the monitor management in the dedicated section of the Wiki.

⛴ Deployment

Although the example above is simple, when you want to deploy Kuvasz to production you'll probably end up with a more mature tooling or configuration. You can find the available configuration properties here. If you are going to deploy Kuvasz with docker-compose or Kubernetes, you should take a look at the deployment related examples, or the Deployment section of the Wiki.

📚 Further reading

If you want to know more about the fundamentals of Kuvasz, head to the Events & Event handlers section!

⁉️ Do you have a question?

There is a dedicated room for Kuvasz on Gitter.

❤️ Sponsors

JetBrains

Thanks to JetBrains for supporting the development of Kuvasz with their Open Source License Program 🙏

kuvasz's People

Contributors

adamkobor avatar dependabot-preview[bot] avatar dependabot[bot] avatar fossabot avatar pollend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kuvasz's Issues

Kubernetes controller to update monitored endpoints in Kuvasz

the operator/controller is an event loop that listens on ingress crud events and calls the matching Kuvasz API endpoints to keep the monitoring state up to date. It's simple code, just a whole bunch of Kubernetes machinery to add. There are SDK

Flyway doesn't pick up migrations in a native image

The following exception has been thrown on startup inside a native image:

io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [javax.sql.DataSource] could not be loaded: Unable to obtain inputstream for resource: db/migration/V1__Test.sql

Jooq transaction rollback caveat

Describe the bug

Transactions in Jooq have a particularity, namely the Configuration that you use to execute SQL statements matters. Each (nested) DSLContext.transaction { configuration: Configuration -> } that you open helps Jooq to determine when to call SQL BEGIN, SAVEPOINT, ROLLBACK, and COMMIT statements.

A quick example

@MicronautTest
class RollbackSpec : FunSpec() {

    @Inject
    lateinit var context: DSLContext

    @Inject
    lateinit var userRepository: UserRepository

    init {
        val user1 = mockUser.setUserId(0).setEmail("[email protected]")
        val user2 = mockUser.setUserId(1).setEmail("[email protected]")

        test("Jooq transaction rolls back") {
            context.transaction { configuration ->
                userRepository.insert(user1) // this one stays in the database
                UserRepository(configuration).insert(user2) // this one gets removed
                throw RuntimeException("Rollback")
            }
        }
    }
}

Inside a transaction block, using a configuration from an "outer" context (even implicitly by using Repositories) will end up with records in the database that should have been rolled back.

Email sending doesn't work in the native image

Running a native image with simple-java-mailer enabled results in the following exception:

java.lang.NoClassDefFoundError: null
kuvasz_1  |     at javax.activation.MailcapCommandMap.class$(MailcapCommandMap.java:180)
kuvasz_1  |     at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:180)
kuvasz_1  |     at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:74)

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.