epacke / BigIPReport

Overview of your loadbalancer configuration
https://loadbalancing.se
8 stars 2 forks source link

iControl REST instead of Snapin (Fix: #98 #159 #160 #163 #165 #166 #168 #169 #176 #179 #180 #181 #182 #183 #184 #185 #186 #187 #188 #189 #190 #191) #161

Closed timriker closed 4 years ago

timriker commented 4 years ago

This is ready for testing. node/pool search syntax changed, as we use the REST text instead of the SOAP text. Builds work from Linux, though powershell on windows is faster in my tests.

Default is to query only the Common partition. This mainly affects members/stats as only pool member stats from Common are returned. Other must be polled separately.

I'm not sure what's missing yet, but here are some stats: old: Stats: G:21 LB:34 VS:6411 P:6511 R:5102 DG:949 C:494 M:4213 ASM:247 new: Stats: G:21 LB:34 VS:5268 P:6511 R:4231 DG:863 C:163 M:3556 ASM:247

timriker commented 4 years ago

Hmm. This is unexpected:

>function foo {
   echo "in foo"
   return 42
}
>$result = foo

>$result        
in foo
42

I didn't realize that "return" values in powershell are just stdout. So I can't write something to stdout and try to return something else. Some logic needs fixing to account for this. Working on it.

epacke commented 4 years ago

Great work Tim! I looked at the code and tried it and it's a tad unstable for me in our environment. I'm thinking that maybe we can break this out to a separate branch, ie master-REST in case there's customers that wish to continue down the SOAP road for a while longer. That'd make it easier to maintain fixes in that version while keeping on polishing this one.

What do you think?

I'll also submit two issues:

One where the Device list does not generate because of a failed device:

jquery.min.js:2 jQuery.Deferred exception: Cannot read property 'toUpperCase' of null TypeError: Cannot read property 'toUpperCase' of null
    at showDeviceOverview (https://bigipreport.domain.com/b2/js/bigipreport.js:2303:48)
    at populateSearchParameters (https://bigipreport.domain.com/b2/js/bigipreport.js:1028:21)
    at Array.<anonymous> (https://bigipreport.domain.com/b2/js/bigipreport.js:201:9)
    at l (https://bigipreport.domain.com/b2/js/jquery.min.js:2:29375)
    at c (https://bigipreport.domain.com/b2/js/jquery.min.js:2:29677) undefined

The other one where it alerts when indexing a vCMP host (it should never have any LTM config).

epacke commented 4 years ago

https://github.com/epacke/BigIPReport/pull/192 fixes #191

timriker commented 4 years ago

I merged #191

If we want to keep the SOAP branch alive, we need to solve the stats issue with 15+ (perhaps 14+?) #177. My work around fills up the log files with warnings. I'm not sure if that's a PSSnap bug? It looks like the SOAP interface changed for stats and the snapin does not handle it. The change might be a bug, in which case we can document it and have F5 fix it. It's unlikely we'll see a new PSSnapin.

I'd prefer dropping the SOAP version entirely.

We do need to find and fix any issue in REST so that there's not a reason for people to avoid it.

epacke commented 4 years ago

I do agree that we should focus on REST. Shall we do it the other way around then and create master-soap?

epacke commented 4 years ago

I created a new protected branch, master-soap. We can chose to drop that one if it's decided it's not needed but at least now it's separated. :)

epacke commented 4 years ago

I created a ticket with F5 regarding the REST problems and I think I need to update the manual page a bit to reflect the new changes.

epacke commented 4 years ago

Let's merge this one so we can have smaller PRs? Don't forget to Squash please! :)

epacke commented 4 years ago

Removed just a few commit messages. Left the rest intact. Well done Tim!

epacke commented 4 years ago

Closed the referred to issues except for the error message as it seemed from the comments that there's a bit left on that one.