Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


jmasseoavio/sensu-go-mssql-check

v0.0.1 · public · Published about 4 years ago

README
Asset Definition
Release Notes
Release Assets

Bonsai Asset BadgeTravisCI Build Status

Sensu Go MSSQL Check

Overview

This is a Golang native check for MSSQL. Using denisenkom/go-mssqldb.

This is pretty simple, it was to help diagnose a problem a customer was seeing with API calls that relied on an MSSQL database.

It just returns 0/1/2 and outputs the times in InfluxDB metrics format.

Configuration

All configuration is via arguments or environment variables. -1 means those checks are disabled. If no checks are enabled, this is just a metrics check. All times are in nanos. So you probably want to specify warntime/crittime as 1000000000 for 1 second.


The Sensu Go mssql check

  

Usage:

sensu-go-mssql-check [flags]

  

Flags:

-C, --connstring string MSSQL Connection String (MSSQL_CHECK_CONNSTRING)

-c, --crittime int MSSQL Query Critical Time (MSSQL_CHECK_CRITTIME) (default -1)

-r, --desiredrows int MSSQL Query Desired Rows (MSSQL_CHECK_DESIREDROWS) (default -1)

-h, --help help for sensu-go-mssql-check

-q, --querystring string MSSQL Query String (MSSQL_CHECK_QUERYSTRING) (default "select 1")

-w, --warntime int MSSQL Query Warning Time (MSSQL_CHECK_WARNTIME) (default -1)

Asset Registration

Assets are the best way to make use of this plugin. If you're not using an asset, please consider doing so! If you're using sensuctl 5.13 or later, you can use the following command to add the asset:

sensuctl asset add jmasseoavio/sensu-go-mssql-check:VERSION

If you're using an earlier version of sensuctl, you can find the asset on the Bonsai Asset Index.

Asset configuration

TODO: Provide an example asset manifest

---

type: Asset

api_version: core/v2

metadata:

name: CHANGEME

spec:

url: https://CHANGEME

sha512: CHANGEME

Resource(check) configuration

Example Sensu Go definition:

---

api_version: core/v2

type: check

metadata:

namespace: default

name: sensu-go-mssql-check

spec:

"...": "..."

  

Functionality

Should run fine. :)

Installation from source and contributing

The preferred way of installing and deploying this plugin is to use it as an [asset]. If you would like to compile and install from source or contribute to it, download the latest version from releases or create an executable from this source.

From the local path of the sensu-go-mssql-check repository:


go build -o /usr/local/bin/sensu-go-mssql-check main.go

For more information about contributing to this plugin, see https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

Either download the source code:

Download Source

Or download the asset definition: