I agree with the order of events, but I don't think that's incompatible with what I want to do. Did you have an idea about doing it all in one script? I'd like to have a script that is pretty generic, so I can use it on a variety of checks. I thought that feeding the computer name in through the SNMP check would be a straightforward way of providing the script a name.
I am looking for specific users on specific computers. On some machines, I would like to make sure a specific user is logged in, and on others, I would like to make sure a specific user is *not* logged in. I think the [When Down Extra Info Field...] will give me the flexibility to get all the way through the alerting cycle and then stop the alert. I thought the sequence could go: Check Tab 1-Run Check - Return MyComputerName 2-Alert is set to run when results contain MyComputerName (so now we are theoretically alerting all the time.) Alert Tab 1-(What)Send SMTP Mail to me with "%e is logged in on %p" 2-(When)When 5 times Down - [When Down Extra Info Field Should Not Contain (Desirable Username)] Doug -----Original Message----- From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Michael Shook Sent: Thursday, January 11, 2007 8:25 AM To: Servers Alive Discussion List Subject: RE: [SA-list] VBScript The conversion script doesn't fire until AFTER the UP/DOWN comparison happens. It is intended to convert the %e returned for output. It sounds like you need to have both steps (get computer name and list of users) in one script. Are you looking for a specific user? Michael D. Shook Systems Analyst - Data Integration Saddle Creek Corporation [EMAIL PROTECTED] 863 668 4477 (work) 863 665 1261 (fax) www.saddlecrk.com -----Original Message----- From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Genné Sent: Wednesday, January 10, 2007 6:56 PM To: Servers Alive Discussion List Subject: RE: [SA-list] VBScript Pretty simple, I think. (Unless you want to point me in another direction) This is a proof of concept for me, and all it is intended to do is return the username in the %e variable. Then I'll just have the alert send or not send based on what username is returned (Through the 'When down the Extra Info field...' checkbox) Once that works I was planning on testing variations to the vbscript that included code to sent different results back to SA depending on what username was returned. Doug ________________________________ From: Servers Alive Discussion List on behalf of Dirk Bulinckx Sent: Wed 1/10/2007 5:10 PM To: Servers Alive Discussion List Subject: RE: [SA-list] VBScript and what are you exactly trying to do? were do you want to get the result of the function? Dirk Bulinckx. ________________________________ From: Servers Alive Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Genné Sent: Wednesday, January 10, 2007 11:01 PM To: Servers Alive Discussion List Subject: [SA-list] VBScript Hello all, I think this should be a simple question, but it's been killing me for most of today. I have an SNMP check (1.3.6.1.2.1.1.5.0) that returns the ComputerName I'm then trying to send this is a simple vbscript that checks a win32 box to see who the currently logged on users are. I can make the script work as a standalone function, so I'm pretty sure I have something wrong in the syntax inside SA. Here's the functioning standalone sample: *** msgbox Whoison(MyComputerName) Function WhoIsOn(x) who = "winmgmts:{impersonationLevel=impersonate}!//"& x &"" Set Users = GetObject( who ).InstancesOf ("Win32_ComputerSystem") For each User in Users list = list & ", " & User.Username Next WhoIsOn=list End Function **** I have the Script configured in Custom Scripts with the correct path and the WhoIsOn as the function name. All I'm getting back in %e is the name of the computer. Also - Is there a Delay involved when a custom script is updated? Sometimes it seems like I don't see a chamge made to a script come through right away. Thanks Doug Genne Manager, IT Palm Restaurant Group To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected] If you use auto-responders (like out-of-the-office messages), then make sure that they are not send to the list nor to the individual members of the list that send a message. Doing this will get you removed from the list. To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected] If you use auto-responders (like out-of-the-office messages), then make sure that they are not send to the list nor to the individual members of the list that send a message. Doing this will get you removed from the list. To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected] If you use auto-responders (like out-of-the-office messages), then make sure that they are not send to the list nor to the individual members of the list that send a message. Doing this will get you removed from the list. -------------------------------------- The information contained in this message is intended only for the use of the addressee. If the reader of this message is not the intended recipient or agent of the intended recipient, you are hereby notified that any dissemination, distribution, or copying of the message is strictly prohibited. To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected] If you use auto-responders (like out-of-the-office messages), then make sure that they are not send to the list nor to the individual members of the list that send a message. Doing this will get you removed from the list. To unsubscribe send a message with UNSUBSCRIBE as subject to [email protected] If you use auto-responders (like out-of-the-office messages), then make sure that they are not send to the list nor to the individual members of the list that send a message. Doing this will get you removed from the list.
