Zabbix Share

Zabbix templates, modules & more
Log in
Choose social to login:
Login With Google
Login With Github

Nav view search

Navigation

Advanced Search
  • Applications
    • 1C
    • Anti-Virus
    • Backup
    • Bug and issue tracking
    • Cluster
    • Clustered File Systems
    • DNS
    • Excel Export
    • Firewall
    • HelpDesk System
    • High Availability (HA)
    • Java Application
    • Mail servers
    • Misc
    • Monitoring System
    • NFS
    • NTP
    • Others
    • Pi-Hole
    • Process Managers
    • Queue managers
    • Security
    • SIEM
    • Skype
    • Ticketing System
    • Time synchronization
    • TV Broadcasting
    • Web-servers
  • Cloud
  • Databases
  • Network Appliances
  • Network Devices
  • Official Templates
  • Operating Systems
  • Power (UPS)
  • Printers
  • SCADA, IoT, Energy, Home Automation, Industrial monitoring
  • Server Hardware
  • Storage Devices
  • Telephony
  • Unsorted
  • Virtualization
  • Zabbix
  • Recently Added
  • Recently Updated
  • Popular
  • Most Rated
  • Top Rated
  • Most Reviewed

SDelete utility

  • 643.png
  • 644.png
  • 645.png

Template for monitoring working of SDelete utility.
Custom-made, maybe will be useful/interesting for somebody. Made for own purposes, published here only "as is", no future modernization planned.
About SDelete, what is this and how it works: https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete
Template provides for SDelete usage on Windows virtual machines in "-z" mode: "Zero free space (good for virtual disk optimization)". Best result is on client Windows machines (tested on Windows 7, Windows 8.1), usage on Windows Servers can be if this is justify for some reasons. "Zero free space" is very helpful for backups of VMs by Snapshot method - tested (and made) on Proxmox. After running "sdelete -z C:" size of backup file decrease on 10+ Gb.

How to install:
- download and unpack archive. Contains SDelete 64 bit version 2.02 (latest for moment of publishing). Download from official site and replace with latest version available.
- copy "SDelete" folder to root of C drive
- Zabbix agent must be installed on this machine in C:\Zabbix\bin\win64\. If you have other directory - please, make changes to file SDelete.ps1.
- edit file SDelete.ps1 - in string "C:\Zabbix\bin\win64\zabbix_sender.exe -z 127.0.0.1 -p 10051 -s $hostname -k sdelete -o $zabbix_result" instead of 127.0.0.1 put your Zabbix server address
- make sure that your file C:\Zabbix\conf\zabbix_agentd.win.conf has correct preferences, as PowerShell script will get hostname from this file. Otherwise, you will have miss-configuration and template will not work.
- on target Windows machine open Task Scheduler and create SDelete task here. Run it as SYSTEM account with highest privileges. Period - as you wish, by default meaning once per week. Set "Actions" - Start a program C:\SDelete\SDelete.cmd
Other parameters - at your discretion. Keep on mind that execution time of SDelete can be several hours. It's individual, that's why I don't offer any values.
- make test run from Task Scheduler to be sure that everything is ok. If SDelete utility will run normally - log file in C:\SDelete\SDeleteC.log must occurs. Stop task if you don't want to wait for finish. If log file was not occurred - something goes wrong.
- import Template to Zabbix server. It's working on Zabbix trapper logic - nothing to poll, just wait for data. Apply Template to target host. Change macros "{$PERIOD}". Value must be as your period from Task Scheduler +1 day. For example, if you are running SDelete script weekly - leave it "8d" as provided; if monthly - put "32d". This is needed for "NODATA" trigger that will inform you in case of some troubles if something fails and script was not run.
- in case of getting "error" - manually check C:\SDelete\SDelete[C,D...].log

That's it. For my purpose everything is fine.
Thanks for attention!

Rating
500
0 vote

Listing Details

Type
Template
Min Zabbix version
3.4.x
Features
  • Zabbix Agent
  • Zabbix Trapper
  • Custom Script
Created
2019-04-21
Modified
2019-04-21 20:47:29
Version 3.4
Download (110 downloads)
1 version, '2019-04-21 17:53' modified
Tags
Proxmox, SDelete, Windows client
Author
MR_Andrew
Owner
Andrew
RecommendReportOwner's listing
All resources created by third parties; use at your own risk
© 2001-2018 by Zabbix SIA. All rights reserved. Trademark Policy · Contact us