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.
How to alarm when sensor value doesn't change
Votes:
0
Best Answer
Votes:
1
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.
13 Replies
Votes:
0
Dear Ismael,
I'm sorry to disappoint, but there is no option to realize such a thing.
Best Regards.
Votes:
0
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).
Votes:
0
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).
Votes:
0
Can you describe the exact situation that you want to monitor?
Created on Apr 22, 2010 10:35:41 AM
Last change on Apr 22, 2010 11:01:13 AM by
Daniel Zobel [Product Manager]
Votes:
0
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.)
Votes:
0
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.
Votes:
0
Torsten - true, but if the queue has a very slow growth rate we would not know for a very long time.
Votes:
0
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.
Votes:
1
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.
Votes:
0
Wow, Gerard, that's great! You wouldn't happen to have one for IBM MQ Series? :)
Votes:
0
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.
Votes:
0
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.
Votes:
0
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.
Add comment