upとdownのそれぞれ(0,1)の値を取得しているので、pingホストの到達不能状態を取得しようとしていますが、到達不能なpingホストを通知する条件「2」を取得するにはどうすればよいですか。
私のコード、
import java.net.InetAddress;
public class PingExample
{
public static void main(String[] args)
{
try
{
InetAddress address = InetAddress.getByName("172.16.2.0");
// Try to reach the specified address within the timeout
// periode. If during this periode the address cannot be
// reach then the method returns false.
boolean reachable = address.isReachable(10000);
System.out.println("Is host reachable? " + reachable);
} catch (Exception e)
{
e.printStackTrace();
}
}
}
アクティブ状態とパッシブ状態とは何ですか?どうすれば確認できますか?
編集:このリンクページ26を参照 http://nagios.sourceforge.net/docs/ndoutils/NDOUtils_DB_Model.pdf
統計列の説明。コードを投稿したときにこの結果を取得したいのですが、その列の「状態」を取得するにはどうすればよいですか?「n」個のホストにループを使用していることを思い出してください。