In our case, I would like to enumerate the usernames of everyone logged into our vpn 
concentrator in an snmp probe. 

I can get the number of current users by looking at a certain oid.

And running a for or do-while loop to enumerate the oid where the usernames are kept 
for current logged in users (1.3.6.1.4.1.?.?.?.?.x where x is the numbers 1 to the 
number of current users).

As far as if-then in a custom snmp probe, I would like to have a custom snmp probe 
throw an alarm if 2 conditions are met, such as ones I've written for disk space. 

If disk space % free < x AND disk space MB free < y
  then ALARM.

I guess this also assumes AND/OR logic to be created as well, which may or may not 
already be in there

James P. Ashe
Systems Analyst 2
ETSU Office of Information Technology
[EMAIL PROTECTED]
OIT Help Desk - 423.439.4648

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William W. Fisher
Sent: Friday, December 12, 2003 11:12 AM
To: InterMapper Discussion
Subject: Re: custom probes

James:

Assuming that we had support for arithmetic expressions involving + - * / available to 
custom probes, can you give me an example of what you would use the additional if-then 
and while loops?  Would you use these in the context of a custom-snmp probe or 
tcp-script, or both?

The TCP script/bytecode interpreter already supports some conditional commands that 
can be used to mimic if-then and while constructs. These
are:

CHCK - branch if string argument is empty.
SBNE - branch if string arguments are not equal NBNE - branch if numeric arguments are 
not equal NBGT - branch if numeric argument1 > argument 2

It's a little work to use these - not quite as convenient as the high-level 
equivalents.

For Custom SNMP probes, I'm not sure how you would use a while loop. 
Can you provide an example?

Thanks,

Bill Fisher
Dartware, LLC
http://www.dartware.com



On Dec 9, 2003, at 4:06 PM, Ashe, James P. wrote:

> Has there been any discussion to adding the ability to add�basic 
> programming logic to the custom probes, i.e. if-then or do-while 
> looping?� I'm eagerly awaiting the ability to do + - * / etc., but 
> wanted to know if any other logic like this would be added to custom 
> probe programming in the future.� Thanks in advance.
> �

____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]



____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]

Reply via email to