Giter Club home page Giter Club logo

sensu-pushbullet-handler's People

Contributors

rgeniesse avatar

Watchers

 avatar  avatar

sensu-pushbullet-handler's Issues

Handler crashes when no devices are configured in Pushbullet

Error:

panic: The param 'device_iden' has an invalid value.

goroutine 1 [running]:
main.notifyPushbullet(0xc0001426c0, 0x0, 0x0)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:95 +0x329
main.run(0xc00017b680, 0xc0000bd500, 0x0, 0x2, 0x0, 0x0)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:80 +0x2a0
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).execute(0xc00017b680, 0xc0000b4190, 0x2, 0x2, 0xc00017b680, 0xc0000b4190)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:762 +0x473
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc00017b680, 0x47, 0xc00017b680, 0xc0001c4300)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).Execute(0xc00017b680, 0x105ea4d, 0xc000189f88)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:24 +0x2b

Support multiple device notifications

Currently, you can only send to a single device or all devices.

Update single device flag to accept just one device or multiple devices.

Rough spec/Pseudocode:

  • Lookup all devices before sending a message
  • Compare to devices in command flag
  • Error if any devices not found
  • Only send notifications to devices if found

Crashes if single device not found

Error:

panic: Device not found

goroutine 1 [running]:
main.notifyPushbulletOne(0xc00013a6c0, 0x0, 0x0)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:142 +0x284
main.run(0xc000173680, 0xc0000c3e00, 0x0, 0x4, 0x0, 0x0)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:96 +0x289
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).execute(0xc000173680, 0xc0000ca010, 0x4, 0x4, 0xc000173680, 0xc0000ca010)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:762 +0x473
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000173680, 0x23, 0xc000173680, 0xc0001ba300)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000173680, 0x0, 0x177b381)
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:24 +0x2b

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.