Code Monkey home page Code Monkey logo

monika-config-generator's Introduction

Monika Config Generator

This is a web app to help generate a configuration file for Monika, the open source Monitoring tool.

Features

  • Wizard form: to help those who are new to Monika create a configuration file quickly and easily.
  • Free form: for those who are already familiar with Monika and want to have advanced configuration.
  • Config import: for those who already have a configuration file and want to customize it.

How to use

Go to the Monika Config Generator web app.

Development

You can run the web app in your own computer by following these steps:

  1. Install Node.js 16 or above.
  2. Clone this repository.
  3. Enter the repo's directory.
  4. Run npm install.
  5. Run npm run dev.
  6. Open your browser and go to http://localhost:3000

Tech Stack

Discussions

If you need help, want to give feedback, or have a great idea to improve Monika, get involved! Let us know in the Github discussions.

Please abide by the Contributor's Code of Conduct

License

MIT License

monika-config-generator's People

Contributors

armedi avatar dennypradipta avatar haricnugraha avatar herenacreative avatar ilmiawan avatar kevin-hyperjump avatar nicnocquee avatar raosan avatar sapiderman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monika-config-generator's Issues

Show list of probes and notifications on the sidebar

When having many probes and notifications, it'll be helpful to be able to see the list of probes and notifications on the sidebar.

  • Show the names of the probes under Probe menu on the sidebar.
  • Show the names of the notification types under the Notifications menu on the sidebar.
  • When a probe on the sidebar is clicked, scroll to that probe.
  • When a notification on the sidebar is clicked, scroll to that notification.
  • When user scrolls down the page, the sidebar should stay visible and sticky to the top.

Screenshot 2021-09-26 at 20 25 51

Default name for probes

When probe has no name, generate a default name from the URL. For example, https://hyperjump.tech becomes hyperjump_tech

Footer Bug in Safari

Bug description

Social media icons have no margins in Safari for Mac.

Screenshot

Screenshot 2021-04-13 at 10 05 47

System

  • macOS Big Sur 11.2.3
  • Safari 14.0.3
  • Commit a4dd09e

Setup development environment

  • Github actions to build and test on PR
  • Github actions to deploy to Github Pages on merge to main
  • Prettier
  • ESLint
  • Typescript type check

Add tests

Use react-testing-library to add tests for the pages or components.

Add title for all the pages

Currently all the pages have not titles in the

  • Page /. Title: Monika Configuration Generator. Description: Web app to generate configuration file for Monika, the open source and free monitoring tool.
  • Page /what-do-you-want. Title: Monika Configuration Generator | Select what to monitor.
  • Page /web-page: Monika Configuration Generator | Add website URL
  • Page /notifications: Monika Configuration Generator | Add notifications
  • Page /download: Monika Configuration Generator | Download
  • Page /advanced: Monika Configuration Generator | Advanced

Vulnerability Found in Next JS Version 10

Describe the bug
Vulnerability have been highlighted by npm audit in dependency of next js

To Reproduce
Steps to reproduce the behavior:

  1. Run npm audit

Expected behavior
No vulnerabilities should be found.

Screenshots
Screenshot from 2021-06-16 12-05-42

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu]
  • Version [e.g. 20.04]

Store the form data temporarily

Use the react context to store the form data temporarily so that the configuration file can be generated and downloaded at the end.

Imported JSON has wrong threshold

Description

When importing existing JSON configuration, the incidentThreshold and recoveryThreshold is not shown correctly in the form.

Steps to reproduce

  • Use this configuration file. Note that the threshold is 10.
  • Import it to monika config generator.
  • The threshold is 5 in the form. It should be 10.
{
  "notifications": [],
  "probes": [
    {
      "id": "2",
      "name": "github.com",
      "description": "Landing page of github.com",
      "interval": 20,
      "incidentThreshold": 10,
      "recoveryThreshold": 10,
      "requests": [
        {
          "url": "https://github.com"
        }
      ],
      "alerts": [
        {
          "query": "response.status < 200 or response.status > 299"
        },
        {
          "query": "response.time > 2000"
        }
      ]
    }
  ]
}

Expected result

  • The threshold value should be 10.
  • If the incidentThreshold and recoveryThreshold are different in the config file, use the bigger one.

Cannot import existing configuration

Bug description

Application shows "An unexpected error has occurred." when existing configuration file is imported. And in the browser's console, there are lots of errors: "TypeError: Cannot convert undefined or null to object"

Step to reproduce

  1. Open the landing page
  2. Choose I have configuration file
  3. Click Next
  4. Select a monika.json

Expectation

  • User should be able to import existing valid config file then edit them in /advanced page.
  • If the file is not valid, e.g., not in JSON format, should show an alert to tell the user about the error.

Add missing notification channels

Problem

The config generator does not support the new notification channels yet.

Screenshot

Screenshot 2021-06-14 at 21 42 49

Expected

  • Support for Monika Whatsapp Notifier channel
  • Support for Facebook Workplace channel

Change file names to use dash

Problem

File names are inconsistent, some using camelCase, some PascalCase.

Solution

Let's use kebab-case. For file names that consist of more than a word, use dash (-) to concatenate. E.g., notification-context.tsx.

Import existing config.json

User should be able to import their configuration file and edit them in monika-config-generator.

TODO

  • Allow user to select their configuration file
  • Show the page where user can edit their configuration file

Generated config file cannot be used in Monika

Problem

Generated config file cannot be used Monika when SMTP notification is defined. The error is

 ›   Error: Failed to send message using SMTP, please check your SMTP 
 ›   notification config.
 ›   Message: No recipients defined

Step to reproduce

  1. Open Monika config generator
  2. Select I'm New to monika
  3. Select web page
  4. Enter few urls
  5. On notification page, send email, specify SMTP server.
  6. Generate config.
  7. Use the config in Monika.

Expectation

The generated config should be usable in Monika

Disable changing number value in a text field by scrolling

Description

In Chrome (maybe in other browser too, haven't checked), when the cursor is hovering above a number field, it changes the value in that field when user scrolls up or down. See the video. This causes unexpected change.

Screen.Recording.2021-10-05.at.08.43.28.mov

Expected

The number value should not change when user scrolls.

Generate config for Monika

When user clicks on Generate Config Button, this app should generate a valid configuration.

TODO

  • Generate a valid config.json (collect data from context)
  • Create a test to make sure the generated json file can be read and validated by Monika.

Bug in Download page

  • Clicking download config file does not do anything
  • Typo: "Click the download buttn below to get it."
  • Clicking Start again does not do anything
  • Clicking Back does not do anything

Bug in landing page

Clicking Next when "I have used Monika before" is selected does not do anything.

Alerts in probe should be minimal 1 alert

By default when running Monika without an alerts, it will be set as status-not-2xx and response-time-greater-than-2000-ms. This could be weird in Monika Config Generator as it allows user to input no alerts at all.

  • Set the minimum alerts to 1
  • When importing configuration without any alerts, set the alerts to status-not-2xx and response-time-greater-than-2000-ms
  • When user tries to uncheck two alerts, make sure that when there is only 1 alert checkbox checked, the other alert checkbox should be disabled

Navigate when clicking Next

Problem

  • Nothing happens when user clicks Next in what-do-you-want page
  • Nothing happens when user clicks Next in api-entry, web-page, and web-form.

Expected

  • User should be able to navigate to web-page, web-form, or api-entry from what-do-you-want page.
  • User should be able to navigate to download from web-page, web-form, or api-entry

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.