CreateMonitor adds a new monitor to the BIG-IP system. <parent> must be one of "http", "https", "icmp", "gateway icmp", or "tcp".
Any help here would be much appreciated. I took a stab at solving this locally, but I'm still getting familiar with the layout of this project. If someone can point me in the right direction, or if its quick patch the issue, I'd appreciate it.
Here is what I have locally.
diff --git a/ltm.go b/ltm.go
index fdd1acd..a4e024f 100644
--- a/ltm.go
+++ b/ltm.go
@@ -728,6 +728,7 @@ type Monitor struct {
Interval int
IPDSCP int
ManualResume bool
+ MonitorType string
Password string
ReceiveString string
ReceiveDisable string
@@ -1421,7 +1422,7 @@ func (b *BigIP) Monitors() ([]Monitor, error) {
// CreateMonitor adds a new monitor to the BIG-IP system. <parent> must be one of "http", "https",
// "icmp", "gateway icmp", or "tcp".
-func (b *BigIP) CreateMonitor(name, parent string, interval, timeout int, send, receive string) error {
+func (b *BigIP) CreateMonitor(name, parent string, interval, timeout int, send, receive, monitortype string) error {
config := &Monitor{
Name: name,
ParentMonitor: parent,
@@ -1429,6 +1430,7 @@ func (b *BigIP) CreateMonitor(name, parent string, interval, timeout int, send,
Timeout: timeout,
SendString: send,
ReceiveString: receive,
+ MonitorType: monitortype,
}
return b.AddMonitor(config)
@@ -1440,7 +1442,7 @@ func (b *BigIP) AddMonitor(config *Monitor) error {
config.ParentMonitor = "gateway_icmp"
}
- return b.post(config, uriLtm, uriMonitor, config.ParentMonitor)
+ return b.post(config, uriLtm, uriMonitor, config.MonitorType)
}
// GetVirtualServer retrieves a monitor by name. Returns nil if the monitor does not exist