Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of much less code for get_apppool.ps1 & get_sites.ps1 #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xenadmin
Copy link

A more modern approach which much less code and fast execution.

A more modern approach which much less code and fast execution.
A more modern approach which much less code and fast execution.
A complete different approach, where the result is expressed as a numeric value, which fits much better to the way Zabbix "thinks & works" internally. Could be expanded by a value mapping inside Zabbix Frontend. 
A trigger would assume, that 'last' should be <> 1
A complete different approach, where the result is expressed as a numeric value, which fits much better to the way Zabbix "thinks & works" internally. Could be expanded by a value mapping inside Zabbix Frontend. 
A trigger would assume, that 'last' should be <> 1
@mhoria
Copy link

mhoria commented Dec 19, 2018

Hello,
Good job! Works fine with WS 2016 @ IIS10 but looking on CPU graphs I notice it puts some pressure on the CPU (10-15% increase) on a web server with 36 Sites.

The powershell code you used works (native) only on Server 2016 and Windows 10 which have the IISAdministration PowerShell Cmdlets. On Windows server 2012 (and R2) it won't work because there is the WebAdminisration module with othe cmdlets. So in order to work (for WS 2012) you will have to install the IISAdministration:
https://blogs.iis.net/iisteam/introducing-iisadministration-in-the-powershell-gallery
or
https://www.powershellgallery.com/packages/IISAdministration/1.1.0.0
Cheers!

@xenadmin
Copy link
Author

xenadmin commented Jan 7, 2019

Hello,
Good job! Works fine with WS 2016 @ IIS10 but looking on CPU graphs I notice it puts some pressure on the CPU (10-15% increase) on a web server with 36 Sites.

I guess you see that in the "get_sites.ps1" file, am I right? If yes, I don't think that's a problem, because this is only used for the Zabbix Low-Level-Disovery, which shouldn't run more than 1 or 2 times a day.

@mhoria
Copy link

mhoria commented Jan 7, 2019

Hello,
Good job! Works fine with WS 2016 @ IIS10 but looking on CPU graphs I notice it puts some pressure on the CPU (10-15% increase) on a web server with 36 Sites.

I guess you see that in the "get_sites.ps1" file, am I right? If yes, I don't think that's a problem, because this is only used for the Zabbix Low-Level-Disovery, which shouldn't run more than 1 or 2 times a day.

I suspect that the get sitestate and apppolstate are responsable for the CPU spike because, indeed, low level discovery runs once a day and but the items prototypes (sitesstate and apppoolstate) runs once 90 seconds for all 36 sites. I have checked the historical data for CPU usage (we are using Zabbix + OpenTSDB + Grafana) and I have noticed this behavior once I enabled the template.

@mertyakan
Copy link

Hi,

Thx for ps1 files. I can see that the variable has changed on the last value. But there are settings of the user o0ste0o inside the xml file. How did you change the trigger settings?

I stopped to pool, and last value changed 1 > 3.

But not view problems.

Trigger Expiression details; {SRV:apppool.state[{#APPPOOL}].str(Stopped)}<>0

Is it true ?

@o0ste0o
Copy link
Owner

o0ste0o commented Jun 16, 2020

Thank you engineers !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants