Ad Widget

Collapse

Monitoring Application

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Monitoring Application

    All,

    We currently have multiple VM servers at our hosted data centre. We would like to use Zabbix to monitor not only the physical server and databases, but, also the applications.

    Is there any way we can perform the following in Zabbix and attribute a success or fail?

    1. Log Into An Application
    2. Perform some 'task'
    3. Interrogate the success of the 'task'

    There may be instances, where a VM server is available and the DB is available, but, the application fails, so we want to capture this.

    Thanks

    Ian

    #2
    Hi,

    It depend on what you are looking for
    If you just want to manage your application like a host

    1) Make a fake host called _MY_APPLICATION
    2) make an item result (two value: 0 KO / 1:OK)
    3) make triggers
    result.last(0) # 1 to test the value of result
    result.nodata(3600) = 1 to Alert of no value get from 3600s (I suppose you test your appli every 3600 s

    4) Make a script (started from crontab (unix) or task manager (windows)) which :
    a) run your application
    b) test the result (0 or 1)
    c) send the result to zabbix using zabbix_sender like
    zabbix_sender -z zbx_server -s _MY_APPLICATION -k result -o 0

    5) Make a map

    For exemple, I am using this kind of work to supervise several DFS replication on windows,

    Comment


      #3
      Or, you may use "User Parameters"
      http://www.zabbix.com/documentation/...ser_parameters

      Comment


        #4
        I've just created a vbs script which I use in Zabbix to monitor DFSR.
        Here is how I did, it might help you:

        vbs script
        Code:
        'catch errors
        If Err.Number <> 0 Then
        Wscript.Echo "Error: " & Err.Number
        Wscript.Echo "Error (Hex): " & Hex(Err.Number)
        Wscript.Echo "Source: " &  Err.Source
        Wscript.Echo "Description: " &  Err.Description
        Err.Clear
        Else
        
        Function verifReplica(objField,objMember,objGroup,objFolder)
        Set objWMIService=GetObject("winmgmts:\\" & objMember & "\root\MicrosoftDfs")
        set colItems= objWMIService.ExecQuery("SELECT * FROM DfsrReplicatedFolderInfo WHERE ReplicatedFolderName ='" & objFolder & "' And ReplicationGroupName Like '%" & objGroup & "%'", "WQL")
        for each objItem in colItems
        select case objField
        case "State"
        verifReplica = objItem.State
        case "ConflictSize"
        verifReplica = objItem.CurrentConflictSizeInMb
        case "StageSize"
        verifReplica = objItem.CurrentStageSizeInMb
        end select
        next
        end Function
        
        parField=wscript.arguments(0)
        parMember=wscript.arguments(1)
        parGroup=wscript.arguments(2)
        parFolder=wscript.arguments(3)
        
        If isEmpty(verifReplica(parField, parMember, parGroup, parFolder)) Then 
          wscript.echo 9
        Else
          wscript.echo verifReplica(parField, parMember, parGroup, parFolder)
        End If
        End If
        Wscript.Quit
        zabbix_agentd.conf on windows server:
        in my case, my script is executed on a server which contacts other server's WMI, I though had to start the zabbix agent with a domain account with required rights;

        Code:
        UnsafeUserParameters=1
        UserParameter=dfsrinfo[*],cscript.exe //Nologo "C:\dfsrinfo.vbs" $1 $2 $3 $4
        On Zabbix, call the dfsrinfo userparameter:
        Item -> key: dfsrinfo[State,Member,groupname,foldername]

        Regards,

        JBS

        Comment

        Announcement

        Collapse
        No announcement yet.
        Working...
        X