Ad Widget

Collapse

How to use item preprocessing Regular Expression to change string to lower case

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twentyninehairs
    Junior Member
    • Jan 2018
    • 7

    #1

    How to use item preprocessing Regular Expression to change string to lower case

    I'm not very fluent with Regular expressions, and I'm having a hard time understanding what to put in the pattern and output fields to change incoming text. I'm simply trying to understand what to put in the pattern and output boxes to change whatever is coming in to lower case text. This is for a hostname.
    Last edited by twentyninehairs; 23-04-2019, 13:24.
  • brunohl
    Senior Member
    Zabbix Certified Specialist
    • Mar 2019
    • 215

    #2
    For what I tried I guess that's not possible with Regex and pre-processing.

    From what I've heard Javascript is available on pre-processing on Zabbix 4.2 (https://www.zabbix.com/documentation...ing_javascript).

    With Javascript is easy to make a string lower case.

    Comment

    • twentyninehairs
      Junior Member
      • Jan 2018
      • 7

      #3
      Hmmm, thanks for the tip! It may be a while before I get around to implementing this. I'll reply with the results!

      Comment

      • twentyninehairs
        Junior Member
        • Jan 2018
        • 7

        #4
        Part of the reason it has taken me a long time to implement this is because I am still running 4.0.1. I will need to upgrade to implement this.

        Comment

        • twentyninehairs
          Junior Member
          • Jan 2018
          • 7

          #5
          I finally upgraded my servers to 4.2.1, and was very pleasantly surprised to find quite a lot of new features. I used the simple function return value.toLowerCase() to convert incoming values to lower case. It works well, and was very easy!!!! Thanks for the tip!!!!!!

          Comment

          Working...