Hi, I'm not checking disk space (although I have seen quite a few examples on Google etc that do). But all I am doing is specifying the ThreshDir in the global config, and in the target config:
ThreshMinI[name]: 1 ThreshMaxI[name]: 1 ThreshProgI[name]: c:\folder\test.bat The target is checking an OID that has a value of 1 if everything is ok. If the value returned is greater than 1 then ThreshProgI kicks in. Modifying that to check for disk space should be pretty simple. Getting it to work when running as a service..... Simon. -----Original Message----- From: Wixted, Joe [mailto:[EMAIL PROTECTED] Sent: 03 August 2004 13:40 To: Fairey, Simon Subject: RE: [mrtg] Problems with MRTG threshold checking when running as a service Hello, Simon! I've got a similar setup here, but haven't gotten into the threshold setup stuff yet. Could you save me a bit of time and send me a sample config from one of your devices that have threshold checking? I'd be most interested in one that checks disk space, as well as any batch file stuff you may wish to share (cut and pasted into the email - my server's configed to strip most attachments. Thanks in advance for any help you can provide! -Joe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fairey, Simon Sent: Tuesday, August 03, 2004 7:14 AM To: [EMAIL PROTECTED] Subject: [mrtg] Problems with MRTG threshold checking when running as a service Hi, I'm using MRTG 2.10.14 on Windows 2003 without problem apart from when trying to use the threshold checking features when MRTG is running as a service. If I start MRTG from the command line (using the same syntax used when running as the service) the threshold stuff works fine - the batch file specified in ThreshProgI does what its supposed to do. When MRTG is run as a service nothing appears to happen. I had thought it was permissions related but have ruled that out by running MRTG from the command line as the same user the service is running as. I have seen another post to this group with the same issue and there was some suggestion that it might be related to path names not being absolute. I have also ruled this out - the service (using srvany) starts MRTG as: C:\perl\bin\wperl.exe c:\mrtg-2.10.14\bin\mrtg --logging=eventlog c:\<folder>\<mrtg config file> and the threshold program: ThreshProgI[<name>]: c:\folder\test.bat To keep things simple whilst trying to identify the cause of this problem the batch file just echos some text to a file (again using absolute path name to the file). I've tried running filemon (from Sysinternals) to see get some idea of what might be going wrong. When MRTG is running from the command line you can see the wperl process open the batch file, query is then close it, and then a cmd.exe process spawns, which I presume is executing the batch file. When MRTG is running as a service the wperl process queries the batch file as before, but no cmd.exe process spawns. The relevant user has execute permissions on cmd.exe. There also does not appear to be any log messages indicating a problem. Can anyone suggest something I am missing / could check? Thanks, Simon. ________________________________________________ This message is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received it by mistake please let us know by reply and then delete it from your system; you should not copy it or disclose its contents to anyone. All messages sent to and from Linklaters may be monitored to ensure compliance with internal policies and to protect our business. Emails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. Anyone who communicates with us by email is taken to accept these risks. The contents of any email addressed to our clients are subject to our usual terms of business; anything which does not relate to the official business of the firm is neither given nor endorsed by it. The registered address of the UK partnership of Linklaters is One Silk Street, London, EC2Y 8HQ. Please refer to http://www.linklaters.com/regulation for important information on the regulatory position of the firm. -- Unsubscribe mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/mrtg FAQ http://faq.mrtg.org Homepage http://www.mrtg.org WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/mrtg FAQ http://faq.mrtg.org Homepage http://www.mrtg.org WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
