Theodore Baschak

BOFH. Open Source Guru. Founder/Operator of Hextet Systems, AS395089 and Network Architect for Daemon Defense Systems, AS55101.

A BGP Slash Command

Fri, 15 Jul 2016 22:47:24 -0500 » Networking, ISP, BGP, System Administration, Network Monitoring, Troubleshooting, Programming, API, CLI

If you’re using Slack then you should already know how easy it is to integrate almost anything into slack using its web APIs. If you’re not already using Slack, what are you waiting for?

As a Slack user and a network administrator I often find myself leaving Slack to check a looking glass, or to whois something. A while back I made an API that supplies various BGP related information back when given an IP address with the intention of making a Slack “Slash Command” first, and maybe a Slack App afterwards if I found it useful.

This turned out to be easier than I expected.

Setting Up a /bgp Slash Command

  1. Go to your Slash Commands.
  2. Under Integration Settings enter the following:
Command: /bgp
URL: "https://api.hextet.net/api/v1/bgp/"
Method: POST
Customize Name: bgp-lookup
Autocomplete:
  - [x] Show this command in the autocomplete list
  - Description: Do BGP Lookup on an IP
  - Usage Hint: [IPv4|v6 Address]
Descriptive Label: BGP Lookup

Thats is.

Now you can use /bgp x.x.x.x in your Slack channels and get BGP lookup info.

If this is handy I may make an app to provide this.

© Theodore Baschak - https://github.com/tbaschak - Powered by Jekyll.
Powered by Les.net.
CiscoDude.net is a personal website. Opinions expressed are not necessarily those of his employer.