Giter VIP home page Giter VIP logo

bosun-vscode's Introduction

Bosun Language Support

Version Downloads

Bosun logo

A Bosun language pack for Visual Studio Code featurng syntax highlighting and code snippets.

VS Marketplace

Syntax Highlighting

Syntax Highlighting Example

OpenTSDB Metric Path Completion

OpenTSDB metric path autocomplete\

Configuration

The settings for OpenTSDB metric path completion are configured per workspace, allowing you to have a different OpenTSDB set up for each bosun project. The following configuration parameters are available:

{
    "bosun": {
        "openTsdb": {
            "url": "<the url of your OpenTSDB api>",
            "port": 4242 // the port your OpenTSDB api is accessible on - default 4242
            "maxEntries": 500 // the number of metrics paths to fetch in the request - default 500
        }
        ...
    }
}

Bosun Configuration Validation

This package provides access to the Bosun configuration testing api if provided with a url to a running instance of Bosun. The command can be found in the command palette ⌘ + ⇧ + P and selecting Bosun: Validate Bosun Configuration. If there is an error in your config, the extensions provides an option to jump to the line with the error.

To configure this command, add the bosun url to your config:

{
    "bosun": {
        "url": "<the url of your bosun instance>"
        ...
    }
}

FAQ

Changing the associated file extension

By default, files with a .conf extention are registered as bosun files. To mark a single file as a bosun file, use the language indicator or the language selection drop down using ⌘K M. For more information see the vscode guide.

To add more file extensions or replace the defaults add the follow snippet the user settings. For more information see the vscode guide.

"files.associations": {
        "*.conf": "bosun"
    }

Autocompletion does not show all my metric paths

This could be caused by not returning enough paths from the suggest API. Try increasing the maxEntries setting.

bosun-vscode's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar repo-ranger[bot] avatar tbutterwith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bosun-vscode's Issues

Highlighting confused by single quotes in non-expr variable assignments

Many of alerts have a $notes variables that then is referenced in a template. When there is a single quote in these the parser gets confused:

selection_111

Text interpolation ... I just don't know ;-)

If it helps, variable assignments in the expression language areas can not span multiple lines, even with something back tick quotes. So once you reach the end of the line in an expression variable assignment you can abandon whatever (in something, e.g. quotes) state you in.

Syntax Highlighting: Issue with operntsdb query filter plugins

If a filter plugin is used, e.g. wildcard(), literal_or() etc., this causes the syntax to be highlighted as if the query until that point is a method name:

$anotherQuery = sum:a.b.c.d{}{foo=wildcard(b*)}

Screenshot 2019-05-21 at 15 40 19

This is using Dark+ (default dark) theme.

Add informative error messages

If the plugin fails to collect auto suggest results from OpenTSDB, any errors are squashed and sent to the debug console. If you don't have this open you may never know the request failed which is a poor user experience.

In the event of a failure fetching results the plugin should display a pop-up, preferably with an informative message to aid in resolving the issue.

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.