Ad Widget

Collapse

Zabbix Items Key name doesn't support characters like: [space], [slash], [dash]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Erton
    Junior Member
    • Feb 2010
    • 8

    #1

    Zabbix Items Key name doesn't support characters like: [space], [slash], [dash]

    I try to use my zabbix 1.8 templates in zabbix 1.8.1 and 1.9 (last trunk) and when i try to add them, i receive the following error in import view:

    Incorrect key format 'key_name[param1,param2,...]'

    and i find what the problem is related to the chars in the "Key" that not admit the character: [ ] [/] [-], and the zabbix 1.8 admit at least [-] (dash) and [ ] (space) characters. I don't now how fix this problem and allow these characters. Any suggestion???

    Greetings from Chile!!!

    PD: sorry for my english, is very bad i know.
    Attached Files
    Last edited by Erton; 09-02-2010, 15:58.
  • webslave
    Junior Member
    • Dec 2009
    • 4

    #2
    I've got the same issue, so I updated the bug with details on a temp fix.



    Change line ~582 in include/defines.inc.php beginning with define('ZBX_PREG_KEY_NAME', to:

    define('ZBX_PREG_KEY_NAME', '([0-9a-zA-Z_\.\-\:\ ,]+)'); /* !!! Don't forget sync code with C !!! */

    Comment

    • Erton
      Junior Member
      • Feb 2010
      • 8

      #3
      Thanks!!!

      It's working now, but the [space] char doesn't right? how add support for these?

      define('ZBX_PREG_KEY_NAME', '([0-9a-zA-Z_\.\-\:\ ,]+)'); /* !!! Don't forget sync code with C !!! */

      define('ZBX_PREG_KEY_NAME', '([0-9a-zA-Z_\ \.\-\:\,]+)'); /* !!! Don't forget sync code with C !!! */
      maybe there right?
      Last edited by Erton; 12-02-2010, 19:46.

      Comment

      Working...