Difference between revisions of "F5 Big IP Monitoring"
Jump to navigation
Jump to search
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | ``` | ||
| + | Working with | ||
| + | https://github.com/scottdware/go-bigip | ||
| + | |||
| + | https://pkg.go.dev/github.com/scottdware/go-bigip | ||
| + | |||
| + | https://f5-sdk.readthedocs.io/en/latest/ | ||
| + | |||
| + | as F5 is no longer under public development in github which is unfortunate. | ||
| + | https://github.com/F5Networks/f5-common-python "NO LONGER UNDER ACTIVE DEVELOPMENT" | ||
| + | ``` | ||
| + | |||
| + | |||
Going to try and get telemetry streaming working. Nice thing no firewalls to worry about. | Going to try and get telemetry streaming working. Nice thing no firewalls to worry about. | ||
| Line 14: | Line 27: | ||
https://help.sumologic.com/01Start-Here/Quick-Start-Tutorials | https://help.sumologic.com/01Start-Here/Quick-Start-Tutorials | ||
| + | |||
| + | |||
| + | https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/installation.html | ||
| + | |||
| + | |||
| + | https://clouddocs.f5.com/products/extensions/f5-telemetry-streaming/latest/event-listener.html | ||
| + | |||
| + | https://pkg.go.dev/github.com/scottdware/go-bigip | ||
| + | ``` | ||
| + | // package bigip | ||
| + | |||
| + | package main | ||
| + | |||
| + | import ( | ||
| + | "fmt" | ||
| + | "github.com/scottdware/go-bigip" | ||
| + | ) | ||
| + | |||
| + | func main() { | ||
| + | // Connect to the BIG-IP system. | ||
| + | fmt.Println("foo") | ||
| + | f5 := bigip.NewSession("host", "user", "pass", nil) | ||
| + | fmt.Println("bar") | ||
| + | |||
| + | // Get a list of all VLAN's, and print their names to the console. | ||
| + | vlans, err := f5.Vlans() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | |||
| + | for _, vlan := range vlans.Vlans { | ||
| + | fmt.Println(vlan.Name) | ||
| + | } | ||
| + | |||
| + | pools, err := f5.Pools() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | |||
| + | for _, pool := range pools.Pools { | ||
| + | fmt.Println(pool.Name) | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | func stash() { | ||
| + | // Get a list of all VLAN's, and print their names to the console. | ||
| + | f5 := bigip.NewSession("host", "user", "pass", nil) | ||
| + | vlans, err := f5.Vlans() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | |||
| + | for _, vlan := range vlans.Vlans { | ||
| + | fmt.Println(vlan.Name) | ||
| + | } | ||
| + | |||
| + | pools, err := f5.Pools() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | |||
| + | for _, pool := range pools.Pools { | ||
| + | fmt.Println(pool.Name) | ||
| + | } | ||
| + | |||
| + | poolMembers, err := f5.PoolMembers("/Demo/pool_host.foo.com") | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("pMs", poolMembers) | ||
| + | |||
| + | for _, poolMember := range poolMembers.PoolMembers { | ||
| + | fmt.Println(poolMember) | ||
| + | } | ||
| + | |||
| + | |||
| + | virtualServers, err := f5.VirtualServers() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("objects", virtualServers) | ||
| + | |||
| + | nodes, err := f5.Nodes() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("objects", nodes) | ||
| + | |||
| + | selfIPs, err := f5.SelfIPs() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("objects", selfIPs) | ||
| + | |||
| + | routes, err := f5.Routes() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("objects", routes) | ||
| + | |||
| + | internalDataGroups, err := f5.InternalDataGroups() | ||
| + | if err != nil { | ||
| + | fmt.Println(err) | ||
| + | } | ||
| + | fmt.Println("objects", internalDataGroups) | ||
| + | } | ||
| + | ``` | ||
Latest revision as of 20:37, 22 February 2022
Working with https://github.com/scottdware/go-bigip https://pkg.go.dev/github.com/scottdware/go-bigip https://f5-sdk.readthedocs.io/en/latest/ as F5 is no longer under public development in github which is unfortunate. https://github.com/F5Networks/f5-common-python "NO LONGER UNDER ACTIVE DEVELOPMENT"
Going to try and get telemetry streaming working. Nice thing no firewalls to worry about.
https://help.sumologic.com/07Sumo-Logic-Apps/22Security_and_Threat_Detection/F5_-_BIG-IP_LTM/01Collect_Logs_for_the_F5_-_BIG-IP_LTM_App
https://clouddocs.f5.com/products/extensions/f5-telemetry-streaming/latest/
https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source
https://help.sumologic.com/01Start-Here/Quick-Start-Tutorials
https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/installation.html
https://clouddocs.f5.com/products/extensions/f5-telemetry-streaming/latest/event-listener.html
https://pkg.go.dev/github.com/scottdware/go-bigip
// package bigip
package main
import (
"fmt"
"github.com/scottdware/go-bigip"
)
func main() {
// Connect to the BIG-IP system.
fmt.Println("foo")
f5 := bigip.NewSession("host", "user", "pass", nil)
fmt.Println("bar")
// Get a list of all VLAN's, and print their names to the console.
vlans, err := f5.Vlans()
if err != nil {
fmt.Println(err)
}
for _, vlan := range vlans.Vlans {
fmt.Println(vlan.Name)
}
pools, err := f5.Pools()
if err != nil {
fmt.Println(err)
}
for _, pool := range pools.Pools {
fmt.Println(pool.Name)
}
}
func stash() {
// Get a list of all VLAN's, and print their names to the console.
f5 := bigip.NewSession("host", "user", "pass", nil)
vlans, err := f5.Vlans()
if err != nil {
fmt.Println(err)
}
for _, vlan := range vlans.Vlans {
fmt.Println(vlan.Name)
}
pools, err := f5.Pools()
if err != nil {
fmt.Println(err)
}
for _, pool := range pools.Pools {
fmt.Println(pool.Name)
}
poolMembers, err := f5.PoolMembers("/Demo/pool_host.foo.com")
if err != nil {
fmt.Println(err)
}
fmt.Println("pMs", poolMembers)
for _, poolMember := range poolMembers.PoolMembers {
fmt.Println(poolMember)
}
virtualServers, err := f5.VirtualServers()
if err != nil {
fmt.Println(err)
}
fmt.Println("objects", virtualServers)
nodes, err := f5.Nodes()
if err != nil {
fmt.Println(err)
}
fmt.Println("objects", nodes)
selfIPs, err := f5.SelfIPs()
if err != nil {
fmt.Println(err)
}
fmt.Println("objects", selfIPs)
routes, err := f5.Routes()
if err != nil {
fmt.Println(err)
}
fmt.Println("objects", routes)
internalDataGroups, err := f5.InternalDataGroups()
if err != nil {
fmt.Println(err)
}
fmt.Println("objects", internalDataGroups)
}