New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How to alarm when sensor value doesn't change

Votes:

0

Your Vote:

Up

Down

Is there a way to create an alarm condition when a sensor value remains the same for a given period of time? For example, when monitoring a message queue it's expected that messages will be removed within a specific period of time. In this case, it would be good to know when the value is above x and equal to it's last scanning interval.

alarm prtg scan-interval sensor

Created on Apr 21, 2010 4:47:13 PM by  Ismael J. Carlo (53) 2 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

New Custom Sensor

There is a new Custom Sensor available at the Google Code project. MessageCount checks a MSMQ for available messages and returns the number of messages that are older than xx minutes.

MessageCount expects the following parameters:

-u=[domain\]username -p=password|passhash -qn=queuename [-qt=queuetype] [-m=machinename] [-t=timedelta]

Note: this sensor targets system dll's that are available only when Message Queuing is enabled on the computer running the sensor.

Go to: "Control Panel\Programs and Features\Windows features\Message Queuing" to enable Message Queuing.

Created on Apr 25, 2010 11:22:35 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



13 Replies

Votes:

0

Your Vote:

Up

Down

Dear Ismael,

I'm sorry to disappoint, but there is no option to realize such a thing.

Best Regards.

Created on Apr 21, 2010 5:47:58 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Along these lines, we were wondering if we could simply create two sensors that run at separate times (perhaps using MUTEX) and then comparing them in a sensor factory. What we don't know is how to keep the interval between each one long enough that it's meaningful (for example: 5 minutes).

Created on Apr 21, 2010 5:50:28 PM by  Ismael J. Carlo (53) 2 1



Votes:

0

Your Vote:

Up

Down

Using the Sensor Factory will probably get complicated very quickly. I would consider using a script (running in PRTG as a sensor) which uses PRTGs API to request the lastvalue from the sensor which all this is about, and write this value into a file. Then in the next run the script would compare the current value with the value in the file, and might cause an error-condition (using the appropriate exit-code) for its sensor in PRTG. With a little bit of more coding it should be possible to also save an array of 10 values into the file (to have a bigger basis for comparison).

Created on Apr 21, 2010 5:59:27 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Can you describe the exact situation that you want to monitor?

Created on Apr 22, 2010 10:35:41 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4

Last change on Apr 22, 2010 11:01:13 AM by  Daniel Zobel [Paessler Support]



Votes:

0

Your Vote:

Up

Down

We would like to monitor the change in number of messages in a MSMQ queue over a fixed period of time. For example, it would be nice if we can detect situation where number of messages in the queue stays the same for 5 minutes. Since we monitor the application's service status we know if it is running but not if it isn't performing work (by removing messages from the queue.)

Created on Apr 22, 2010 9:30:48 PM by  Ismael J. Carlo (53) 2 1



Votes:

0

Your Vote:

Up

Down

Message Queues usually get bigger if a system is not working. This is of course something which could be addressed with a fixed threshold trigger.

Created on Apr 23, 2010 2:02:58 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Torsten - true, but if the queue has a very slow growth rate we would not know for a very long time.

Created on Apr 23, 2010 2:08:48 PM by  Ismael J. Carlo (53) 2 1



Votes:

0

Your Vote:

Up

Down

Hi Ismael,

I could enumerate the messages in a specified private queue on the local machine and return the number of messages that reside in the queue longer than xx minutes. I'm not shure if I can also do this with queues on a remote machine, but that might require some more testing.

What's your situation, are the messages in a private queue on a machine where you can also install a PRTG probe? If that's the case, I can write a Custom Sensor to solve your problem.

Created on Apr 23, 2010 3:22:36 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



Accepted Answer

Votes:

1

Your Vote:

Up

Down

New Custom Sensor

There is a new Custom Sensor available at the Google Code project. MessageCount checks a MSMQ for available messages and returns the number of messages that are older than xx minutes.

MessageCount expects the following parameters:

-u=[domain\]username -p=password|passhash -qn=queuename [-qt=queuetype] [-m=machinename] [-t=timedelta]

Note: this sensor targets system dll's that are available only when Message Queuing is enabled on the computer running the sensor.

Go to: "Control Panel\Programs and Features\Windows features\Message Queuing" to enable Message Queuing.

Created on Apr 25, 2010 11:22:35 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



Votes:

0

Your Vote:

Up

Down

Wow, Gerard, that's great! You wouldn't happen to have one for IBM MQ Series? :)

Created on Apr 27, 2010 1:39:22 PM by  Ismael J. Carlo (53) 2 1



Votes:

0

Your Vote:

Up

Down

Hi Ismael,

I don't have IBM hardware to test with, so I'm afraid that I have to disappoint you. It could be done though, as IBM provides the IBM.WMQ for Visual Studio .net to communicate with Websphere MQ.

Created on Apr 27, 2010 5:58:18 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



Votes:

0

Your Vote:

Up

Down

Gerard, is the code for the MSMQ sensor in your subversion repository on Google? We would like to take a look at what we could do to extend it to monitor IBM MQ Series.

Created on Apr 28, 2010 3:49:16 PM by  Ismael J. Carlo (53) 2 1



Votes:

0

Your Vote:

Up

Down

Hi Ismael,

This is what the sensor is basically doing:

    ''' <summary>
    ''' Gets the messages from the specified queue
    ''' </summary>
    ''' <remarks></remarks>
    Private Sub GetMessages()
        Dim allQueues() As MessageQueue
        If _queueType.ToUpper = "PUBLIC" Then
            allQueues = MessageQueue.GetPublicQueuesByMachine(_machine)
        Else
            allQueues = MessageQueue.GetPrivateQueuesByMachine(_machine)
        End If

        Dim queuePath As String = ""
        For Each Q As MessageQueue In allQueues
            If Q.QueueName.EndsWith(_queueName) Then
                queuePath = Q.Path
                Exit For
            End If
        Next
        If queuePath = "" Then
            Throw New Exception("Queuename not found on specified machine")
        End If

        Dim queue As New MessageQueue(queuePath, QueueAccessMode.Peek)
        queue.MessageReadPropertyFilter.SetAll()

        Dim count As Integer = 0
        For Each m As Message In queue.GetAllMessages
            If m.ArrivedTime.AddMinutes(_checkTime) < DateTime.Now Then
                count += 1
            End If
        Next
       
        If count > 0 Then
            If count > 1 Then
                System.Console.WriteLine(String.Format("{0}:{0} message found", count))
            Else
                System.Console.WriteLine(String.Format("{0}:{0} messages found", count))
            End If
        Else
            System.Console.WriteLine(String.Format("{0}:No messages found", count))
        End If
    End Sub

If you can connect you IBM machine to a public IP, I would be happy to make the changes for you. If you need more information, there is a link to my email address onthis page.

Created on Apr 29, 2010 9:18:45 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,925) 3 4



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.