Ad Widget

Collapse

Need help with preprocessing.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mellis
    Senior Member
    • Oct 2017
    • 145

    #1

    Need help with preprocessing.

    Good Morning I have a question about how to do some preprocessing of a XML XPATH.

    I am setting up monitoring of a MySQL database I am using a mysql query "show global status" to get the XML XPATH file. From this i build a handful of dependent item that i run the preprocessing. These keep erroring out.

    The XML XPATH file looks like this:
    2021-08-12 09:06:59 mysql: [Warning] Using a password on the command line interface can be insecure. <?xml version="1.0"?>
    <resultset statement="show global status " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <row>
    <field name="Variable_name">Aborted_clients</field>
    <field name="Value">755</field>
    </row>
    <row>
    <field name="Variable_name">Aborted_connects</field>
    <field name="Value">930</field>
    </row>
    <row>
    <field name="Variable_name">Acl_cache_items_count</field>
    <field name="Value">0</field>
    </row>
    <row>
    <field name="Variable_name">Binlog_cache_disk_use</field>
    <field name="Value">0</field>
    </row>

    For the first item i want the Aborted Clients so i have setup a preprocessing like this:

    XML XPATH /resultset/row[field/text()='Aborted_clients']/field[@name='Value']/text()

    The type of information I have now is text, but i really want a number.

    Attached is a word doc with screen shots.

    OH, i am running the Zabbix 4.4 server and agents on a Oracle Linux 7.8 servers.

    Thanks
    Attached Files
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Just set type of information = Numeric (unsigned) .
    If after preprocessing you get a value that the server can convert to a number , it will successfully write it to the database.
    Last edited by Hamardaban; 13-08-2021, 10:11.

    Comment

    Working...