Ad Widget

Collapse

external vbs script - input / output question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • richardkraal
    Junior Member
    • Jul 2008
    • 8

    #1

    external vbs script - input / output question

    I've the following situation

    I want to monitor the internal DB size of an exchange database, the good thing is that I've made an vbs script which can tell me that.

    the script needs two variables, the exchange server and the database
    the command line syntax could be like this: exchange2003db.vbs "server1" "mailbox store"

    when i run the script at the command prompt:
    cscript /Nologo C:\Zabbix\exchange2003db.vbs "server1" "mailbox store"
    it answers correctly 45000kb


    the problem is how do I get this into zabbix server as an item???
    I've read the manual and searched the help several times but cannot find the right method. When I create an item I use the following properties:

    item type = zabbix external
    key = exchange2003db["server1","mailbox store"]
    type of info = num / int

    exchange2003db is added to the zabbix_agentd.conf like this

    UserParameter=exchange2003db,cscript /Nologo C:\Zabbix\exchange2003db.vbs"

    when I enable the item and I put logging on the agent it tells me that the script has been run without parms (so without the "server1" and "mailbox store" vallues)


    is there somebody who uses this also, and what sort of config you use
    the help docs are very poor at this point. I you need some info please ask


    we run zabbix 1.4.4 on debian, agents @ 1.4.4.
  • navtek007
    Senior Member
    • May 2005
    • 100

    #2
    Hi,

    We are doing the same thing my script basically requires a input of the mailbox store and then spits back a number.

    In my zabbix_agentd.conf file i have the following user parameter

    UserParameter=storeSize.DB01,cscript //nologo c:\progra~1\zabbix\mbxSize.vbs DB01

    Then in zabbix i create an item that points to storeSize.DB01 on my mail server.

    hope that helps.

    Comment

    • cordeiro
      Junior Member
      • Jul 2007
      • 10

      #3
      Change the item type

      Hi Richard,

      You have to change the item type definition : use Zabbix Agent instead of External because you've defined an UserParameter !

      Sincerely,

      Comment

      • richardkraal
        Junior Member
        • Jul 2008
        • 8

        #4
        it works now!

        Comment

        • Hotzenwalder
          Junior Member
          • Apr 2008
          • 11

          #5
          Richard,

          Would it be possbile to share this VBScript with the community over here or send it to me in a PM?

          Comment

          Working...