Forum

HDD %80 doluluk
 
Bildirimler
Hepsini Temizle

HDD %80 doluluk

5 Yazılar
3 Üyeler
0 Likes
1,035 Görüntüleme
(@BatuhanKARAMAN)
Gönderiler: 49
Trusted Member
Konu başlatıcı
 

Merhaba,

Şirkette kullandığımız Windows 2008 kurulu serverlar ve NAS'ların diskleri %80'e ulaşınca mail attırmak mümkün mü? Batch ile yapılabilir mi?

 
Gönderildi : 27/07/2016 11:17

(@ozgurmazlum)
Gönderiler: 2208
Illustrious Member
 

Bu script işinizi görebilir.

 

https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-Sample-f7164554

 
Gönderildi : 27/07/2016 11:50

(@turancoskun)
Gönderiler: 4100
Üye
 

merhaba,

kullandığınız nas markasını bilmemekle birlikte, yönetim panellerinde disk doluluk oranı vb. uyarılar ile ilgili, notification tabını inceleyebilirsiniz.

2008 server tarafında, birkaç farklı yol ile çözüm üretebilirsiniz.

sunucu sayınız fazla değil ise, aşağıdaki link işinizi görecektir.

http://www.fixitjim.net/2012/05/how-to-configure-disk-space-alerts-on.html

****************************************************************
Probleminiz Çözüldüğünde Sonucu Burada Paylaşırsanız.
Sizde Aynı Problemi Yaşayanlar İçin Yardım Etmiş Olursunuz.
Eğer sorununuz çözüldü ise lütfen "çözüldü" olarak işaretlerseniz diğer üyeler için çok büyük kolaylık sağlayacaktır.
*****************************************************************

 
Gönderildi : 27/07/2016 11:51

(@BatuhanKARAMAN)
Gönderiler: 49
Trusted Member
Konu başlatıcı
 

Merhaba,

Kullanım konusunda bilginiz var mi? Ben beceremedim galiba

Bu script işinizi görebilir.

 

https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-Sample-f7164554

 
Gönderildi : 27/07/2016 16:32

(@ozgurmazlum)
Gönderiler: 2208
Illustrious Member
 

Daha yalın halde bir powershell scripti bunu .ps1 uzantısı ile kayıt edip schedule task olarak çalıştırmanız gerekmektedir. SMTP bilgilerini kendinize göre güncelleyerek mail göndertebilirsiniz.

$lowSpace = 10.00

# E-mail stuff
# Multiple e-mail addresses should be in this format "<[email protected]>, <[email protected]>"
$to = ""
$from = "no-reply@localhost.localdomain"
$smtpServer = "smtp.localdomain"

# Injest Server list, one server FQDN per line
# You may need to have the full path to the servers.txt here if you're running this as a scheduled task
$servers = (Get-Content "servers.txt")

# Check each server
foreach ($server in $servers)
{

# First check if the server is up
if ((Test-Connection -quiet $server) -eq $true) {

# Get all the volumes on the server with out a drive letter
$volumes = Get-WmiObject -computer $server win32_volume | Where-object {$_.DriveLetter -eq $null}

# Check each volume found
foreach ($volume in $volumes) {

# Skip the System Reserved volume. It will always be low
if ($volume.Label -ne "System Reserved") {

# Do some math to convert bytes into GB, rounded and 2 decimal places
if (([math]::round(($volume.FreeSpace / 1073741824),2)) -le $lowSpace) {

# Send an e-mail notification including low disk space setting, server fqdn and volume name
$subject = "Low disk space warning (below $($lowSpace)GB) - $($server) - $($volume.Label)"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($from, $to, $subject, "")

}

}

}

}

}

 
Gönderildi : 04/08/2016 17:35

Paylaş: