Skip to content

sudodeo/betterstack-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BetterStack-Go

Explore seamless integration with BetterStack's powerful APIs using this Golang SDK. This personal project is crafted to streamline your development process, offering a robust set of tools for interacting with Betterstack services. While it's not officially affiliated with BetterStack, this SDK aims to provide a convenient and efficient way for developers to enhance their projects with the flexibility of the BetterStack Golang SDK.

Installation

go get -u github.com/sudodeo/betterstack-go/sdk

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

UPTIME_API_TOKEN

To obtain your uptime API token, view instructions from BetterStack

LOGS_API_TOKEN

To obtain your logs API token, view instructions from BetterStack

Documentation

Uptime API Documentation

Logs API Documentation

Features

Uptime

  • Monitors
  • Monitor groups
  • Heartbeats
  • Heartbeat groups
  • On-call calendar
  • Escalation policies
  • Incidents
  • New Relic Integrations
  • Datadog Integrations
  • AWS Cloudwatch Integrations
  • Azure Integrations
  • Google Monitoring Integrations
  • Grafana Integrations
  • Prometheus Integrations
  • Email Integrations
  • Incoming webhooks
  • Splunk On-call Integrations
  • PagerDuty Integrations
  • Status Pages
  • Status Pages Sections
  • Status Pages Resources
  • Status Pages Reports
  • Status Pages Report Updates
  • Metadata

Logs

  • Sources
  • Query

Usage/Examples

package main

import (
    "github.com/sudodeo/betterstack-go/sdk"
    betterstack "github.com/sudodeo/betterstack-go/sdk/uptime" // for uptime API
)

func main(){
    bs, err := betterstack..New(&sdk.Config{APIToken: token, APIType: "uptime"})
    if err != nil {
        panic(err)
    }

    incidents, err := bs.ListIncidents()
    if err != nil {
        panic(err)
    }

    log.Println(incidents)
}

Author

About

Golang SDK client for betterstack.com APIs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published