<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Мониторинг сети]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5619&amp;type=atom" />
	<updated>2011-03-22T11:15:30Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5619</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Мониторинг сети]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=46559#p46559" />
			<content type="html"><![CDATA[<p><a href="http://www.script-coding.com/Ping.html">Рецепты Windows Scripting: определение существования компьютера и состояния служб</a></p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2011-03-22T11:15:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=46559#p46559</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: Мониторинг сети]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=46558#p46558" />
			<content type="html"><![CDATA[<p>Добрый день!<br />Помогите пож-та разобраться с написанием скрипта по мониторингу сети на основе ping<br />Идея такая: скипт пингует несколько ip, если понга нет-сообщение на экран и письмо по почте<br />Далее - если пропадает подряд второй пинг - то также сообщение на экран и письмо....</p><p>С сообщением на экран и письмом по почте проблем нет ) И с той ситуацией когда пинга нет вообще - тоже проблем....нет<br />Затрудняюсь отразить в скрипте тот вариант, когда пинг не стабильный........Кто знает как это реализовать ?</p><div class="codebox"><pre><code>Const EMAIL_RECIPIENT = &quot;admin@admin.ru&quot;
strMachines = &quot;dc1;dc2&quot; 
aMachines = split(strMachines, &quot;;&quot;) 
  
For Each machine in aMachines 
    Set objPing = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}&quot;)._ 
        ExecQuery(&quot;select * from Win32_PingStatus where address = &#039;&quot;_ 
            &amp; machine &amp; &quot;&#039;&quot;) 
    For Each objStatus in objPing 
        If IsNull(objStatus.StatusCode) or objStatus.StatusCode&lt;&gt;0 Then 
            MsgBox &quot;Уважаемый пользователь! &quot; &amp; &quot;&quot; &amp; &quot; Обнаружена проблема в работе сети!&quot;, 16, &quot;ВНИМАНИЕ!&quot; 
            EmailNotification
        End If 
    Next 
Next</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Elencheg]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26085</uri>
			</author>
			<updated>2011-03-22T11:13:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=46558#p46558</id>
		</entry>
</feed>
