juanito99 / windows.server.webservice.logdirectorywatcher Goto Github PK
View Code? Open in Web Editor NEWMonitor Log directories of Webservers on Windows
License: GNU General Public License v3.0
Monitor Log directories of Webservers on Windows
License: GNU General Public License v3.0
User reported:
I got an error on the script on one exchange machine in my testscom:
System.Management.Automation.MethodInvocationException: #Exception calling "Parse" with "1" argument(s): "Input string was not in a correct format."At line:113 char:4
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Microsoft.EnterpriseManagement.Common.PowerShell.RunspaceController.RunScript[T](String scriptName, String scriptBody, Dictionary`2 parameters, Object[] constructorArgs, IScriptDebug iScriptDebug, Boolean bSerializeOutput)
Skriptnamn: MonitorLogDirectoryThreeState.ps1
It would be nice to have a column with the status of the website under "websites - IIS" view.
Eg. running, paused, stopped.
This management pack cannot be imported.
: XSD verification failed for the management pack. [Line: 43, Position: 89]
'>' is an unexpected token. The expected token is '='. Line 43, position 89.
Im sure i can fix it, but if its a general issue.. :)
Regards :)
Kenneth
Example oif one working and one that is not working.
PS C:\admin> $webLogDirectory2 = "D:\logs\W3SVC16"
PS C:\admin> ((Get-ChildItem -Path $webLogDirectory2 | Measure-Object -property length -sum).Sum / 1MB)
66,0026407241821
PS C:\admin> [double]::TryParse(([Math]::Round(((Get-ChildItem -Path $webLogDirectory2 | Measure-Object -property length -sum).Sum / 1MB), 1)),[ref]$webLogDirSizeMB)
True
PS C:\admin> $webLogDirSizeMB
66
PS C:\admin> $webLogDirectory = "D:\logs\W3SVC14"
PS C:\admin> ((Get-ChildItem -Path $webLogDirectory | Measure-Object -property length -sum).Sum / 1MB)
129,689879417419
PS C:\admin> [double]::TryParse(([Math]::Round(((Get-ChildItem -Path $webLogDirectory | Measure-Object -property length -sum).Sum / 1MB), 1)),[ref]$webLogDirSizeMB)
False
PS C:\admin> $webLogDirSizeMB
0
PS C:\admin> [double]::TryParse([Math]::Round(((Get-ChildItem -Path $webLogDirectory2 | Measure-Object -property length -sum).Sum / 1MB), 1))
Cannot find an overload for "TryParse" and the argument count: "1".
At line:1 char:1
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
The unsealed pack has .130 while the sealed pack has .129.
Hi
Looking at class Windows.Server.Webservice.LogdirectoryWatcher.WebSite.Base, I noticed that it contains at least 4 volatile properties: LogDirModifiedDate,LogDirScanDate, LogDirSizeInMB, LogDirNoOfFiles.
As per https://social.technet.microsoft.com/wiki/contents/articles/14256.operations-manager-management-pack-authoring-classes-and-relationships.aspx#Properties_that_Update_Too_Frequently you should not have properties in classes that change often (as it may cause config churn -- Some post from Kevin Holman). Logically those properties will change every time the discovery will run (every 14400 seconds).
Unless needed, I would recommend you stop discovering them..
HTH
This is currently by design. This MP does not monitor the webservice. It only monitors the log file folder size.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.