Forum Discussion
JPAO_381686
Nimbostratus
Mar 02, 2019Integration with Nagios Log Server
Hi guys,
I was just wandering if there's anyone who could relay how to load balance logs from rsyslog (linux) & nxlog (windows). So that in an event that an instance of a nagios log server cluster fails, the other cluster member will receive logs using F5 round robin load balancing.
Thanks to anyone who can share.
- The_Bhattman
Nimbostratus
Hi Puli,when HTTP_REQUEST { if { [HTTP::header "Accepted-Language"] contains "fr" } { HTTP::redirect http://www.abc.com/fr/help } }
when HTTP_REQUEST { switch -glob [HTTP::header "Accepted-Language"] { "*fr*" - { HTTP::redirect http://www.abc.com/fr/help } "*en-us*" - { HTTP::redirect http://www.abc.com/fr/help } default - { HTTP::redirect http://www.abc.com/help } } }
- Colin_Walker_12Historic F5 AccountKeep in mind both of those examples are using a "contains" style match, which means you're not necessarily using their preferred language, just one that they support. To be more specific you'd want to find the first language in the list.
- hoolio
Cirrostratus
You'd probably also want to only check a few URIs (/ and the main index page come to mind) so you're not checking the header on every request. Also, if the help pages are on the same VS as this iRule, you'd need some kind of logic to avoid a loop of redirects.foreach line [split [HTTP::header Accept-Language] "," ] { switch -glob [getfield $line ";" 1] { "de*" { ... Break out of the loop as we found a match break } }
- Colin_Walker_12Historic F5 Account@Aaron - Agreed on the loop being expensive. It's likely an unnecessary cost, too. You could easily get the first entry or two without having to loop through the entire header. You'd save cycles and lose effectively no functionality that way.
- Puli
Nimbostratus
I agree Aaron, just looking at the first language entry and switch will be less expensive. - Puli
Nimbostratus
Found this useful add-on on firefox to switch you browser locales to different languages.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects