-
Re: Volume Alert Macro Question
ecklerwr1Feb 26, 2010 10:22 AM (in response to aLTeReGo)
I have no idea ALTe but sound like a cool idea... I'll experiment a little with this as I love TreeSize Pro and WinDirStat...
-
Re: Volume Alert Macro Question
ecklerwr1Feb 26, 2010 11:24 AM (in response to aLTeReGo)
It's going to have to be something like:
"c:\bin\treesize.exe" \\${NodeID}\${Caption}
Caption is the User-assigned name for this volume which could be c$, d$, etc. or I suppose if nothing else worked you could use a custom property instead.
-
Re: Volume Alert Macro Question
ecklerwr1Feb 26, 2010 11:24 AM (in response to aLTeReGo)
It's going to have to be something like:
"c:\bin\treesize.exe" \\${NodeID}\${Caption}
Caption is the User-assigned name for this volume which could be c$, d$, etc. or I suppose if nothing else worked you could use a custom property instead.
-
Re: Volume Alert Macro Question
viol8tor Feb 26, 2010 11:33 AM (in response to aLTeReGo)Once you have your Volume Alert trigger setup,
You can add this to the trigger action to give you the UNC:
${SQL: Select '\\' + n.caption + '\' + (select substring(v.caption,1,1))
from Volumes v
join nodes n on v.nodeid=n.nodeid
where v.volumeid=${VolumeID}}
This isn't tested, but should work.
Make sure your volume trigger specifies ' fixed disk' and you are checking for volume status of unknown.
- v
-
Re: Volume Alert Macro Question
viol8tor Feb 26, 2010 11:38 AM (in response to viol8tor)Sorry forgot to add the '$'
${SQL: Select '\\' + n.caption + '\' + (select substring(v.caption,1,1)) + '$'
from Volumes v
join nodes n on v.nodeid=n.nodeid
where v.volumeid=${VolumeID}}
-v
-
Re: Volume Alert Macro Question
ecklerwr1Feb 26, 2010 11:42 AM (in response to viol8tor)
If this works on any volume it would be pretty cool...
-
Re: Volume Alert Macro Question
viol8tor Feb 26, 2010 11:50 AM (in response to ecklerwr1)It will, as long as it is for Windows and it is a fixed disk.
This will not work for linux mounts or Windows Volumes mounted as a folder.
Just remember to add that logic to your alert trigger.
-v
-
-
-
Re: Volume Alert Macro Question
W1ngnu7 Oct 1, 2012 11:32 AM (in response to viol8tor)Has this been verified to work? I like this whole idea of using Treesize.
-
Re: Volume Alert Macro Question
aLTeReGoOct 2, 2012 9:17 AM (in response to W1ngnu7)
The concept is sound, but it's all a matter of what you want to do with this information once it's been created. You could in theory run blat or something similar to email you resulting report, or export it to HTML or GIF/JPG/PNG and link to it in an iframe within the volume details view.
-
Re: Volume Alert Macro Question
aLTeReGoOct 6, 2012 8:47 PM (in response to aLTeReGo)
I spent some time getting this working in my lab. Below is an example of those results. Essentially I created an alert that would notify me if any Windows volume exceeds 90% utilization, and email me a report of its filesystem usage. It may need to be adapted to suite your environment slightly based on the following requirements
1. Install TreeSize Pro on Your Orion server, accepting the default install location (or adjust the file path location in the Treesize.bat attached)
2. Import the Advanced Alert included in the attached ZIP file into Orion
3. Copy the Treesize.bat to the root your Orion servers C:\ Drive (or adjust the file path location in the Advanced Alert)
4. Download Blat and extract the archive to your search path (such as c:\windows). If you're running Windows 2008 you may need to right click on each file, select properties, and click "unblock" for blat to work properly. (Note: Alternatively you can extract blat to a specific directory such as c:\blat\ provided you update the file location in the treesize.bat file attached)
4. Change the User Account the Advanced Alert Manager runs under from System to a domain admin account, so TreeSize has appropriate permissions to access network shares. (Note: alternatively you can use a local administrator account for the Advanced Alert Manager and utilize PsSxec to execute TreeSize with a domain admin account if you'd rather not run the service itself under a domain account)
When you're done you should be receiving email notifications similar to the one below when the volume usage of a monitored windows host exceed 90% utilization.
-
Re: Volume Alert Macro Question
W1ngnu7 Oct 25, 2012 11:56 AM (in response to aLTeReGo)The IP address in the .BAT file, is that the solarwinds server?
-
Re: Volume Alert Macro Question
aLTeReGoOct 25, 2012 5:49 PM (in response to W1ngnu7)
The IP address in the BAT file is for the SMTP server. My lab setup doesn't include a DNS server. Hence the email address of meb@10.199.15.156
-
-
Re: Volume Alert Macro Question
chosenv3 May 12, 2015 4:57 AM (in response to aLTeReGo)Hello,
Thank you so much for this. I have been looking for something like this for so long and we already use Treesize so it saves us purchasing additional licenses!
I am however having an issue with getting it to work.Hopefully its something simple that you can help with.
I have installed Treesize Pro on my Solarwinds server to the default location.
I put the batch file under D:\Treesize
Below is the batch file - edited to hide business information.
"C:\Program Files\JAM Software\TreeSize Professional\TreeSize.exe" /HTML "C:\Windows\Temp\%2.HTML" %1$
BLAT "C:\Windows\Temp\%2.HTML" -S "%~3 is %~4 used" -to xxx@xxx -f Solarwinds@xxx.com -server xxx@xxx.co.uk
When I run BLAT on its own, it emails me the file, so I know this isn't the issue.
When I run the treesize line on its own, this launches treesize but obviously doesn't work due to incorrect parameters. But I know treesize is launching ok.
When I run a test against the Advanced alert, I am told that the alert triggers correctly.
So I think the issue is with the execute program command.
C:\Windows\System32\cmd.exe /C D:\Treesize\treesize.bat ${SQL:Select '\\' + n.IP_Address + '\' + (select substring(v.caption,1,1)) from Volumes v join nodes n on v.nodeid=n.nodeid where v.volumeid=${VolumeID}} ${Node.Caption} "${Fullname}" "${VolumePercentUsed}"
Any advice would be appreciated.
Many Thanks
-
Re: Volume Alert Macro Question
chosenv3 May 12, 2015 5:02 AM (in response to chosenv3)I forgot to mention that I have the alert service running as a Domain account which has admin rights to the servers in question
-
Re: Volume Alert Macro Question
aLTeReGoMay 12, 2015 8:45 PM (in response to chosenv3)
The "-server xxx@xxx.co.uk" parameter/switch is not an email address, but rather the SMTP server blat will use to send the email.
-
Re: Volume Alert Macro Question
chosenv3 May 13, 2015 1:05 AM (in response to aLTeReGo)Apologies - I edited it wrong when I published it on here. I have that as the SMTP server exchange.live.xxx.com.
I tested the blat part and it works fine. The html report itself isn't being generated in the first place.
Thanks
-
Re: Volume Alert Macro Question
aLTeReGoMay 13, 2015 4:55 PM (in response to chosenv3)
Instead of executing an external program, have the alert write to a file the following output. This should help troubleshoot what is being passed to the command line and where potentially the problem lies.
C:\Windows\System32\cmd.exe /C D:\Treesize\treesize.bat ${SQL:Select '\\' + n.IP_Address + '\' + (select substring(v.caption,1,1)) from Volumes v join nodes n on v.nodeid=n.nodeid where v.volumeid=${VolumeID}} ${Node.Caption} "${Fullname}" "${VolumePercentUsed}"
-
-
-
-
-
Re: Volume Alert Macro Question
aLTeReGoOct 15, 2017 4:51 PM (in response to aLTeReGo)
There has been some question as to the alert trigger action contained in this alert. It passes a UNC path variable to a batch file (treesize.bat) and tells it what volume on which server to run Treesize against.
C:\Windows\System32\cmd.exe /C C:\treesize.bat ${SQL:Select '\\' + n.IP_Address + '\' + (select substring(v.caption,1,1)) from Volumes v join nodes n on v.nodeid=n.nodeid where v.volumeid=${VolumeID}} ${Node.Caption} "${Fullname}" "${VolumePercentUsed}"
When viewed in Task Manager, you can see Treesize is generating an HTML file with the name of the server, then passing the UNC path to that server volume. In this case, "LAB-VM03-1" has the IP address '10.199.1.194' and the volume this alert is triggering against is the "F:\".
Hopefully that helps to clarify any confusion.
-
Re: Volume Alert Macro Question
aLTeReGoOct 20, 2017 11:24 AM (in response to aLTeReGo)
Updated Alert definition for use with Orion's Web Based Alerting (older version attached above is for use with the legacy Win32 Advanced Alert Manager). The Batch file included in the Zip file attached above and BLAT are still required.
-
-
-
-