| <?php |
| /******************************************************************************* |
| * Copyright (c) 2013 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Denis Roy (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| $_DATE = $_GET['date']; |
| $_HOUR = $_GET['hour']; |
| $_TXKBPS = $_GET['TXKBPS']; |
| $_RXKBPS = $_GET['RXKBPS']; |
| $_HOSTNAME = $_GET['hostname']; |
| |
| $_L1 = $_GET['l1']; |
| $_L2 = $_GET['l2']; |
| $_L3 = $_GET['l3']; |
| |
| $_HTTPCONN = $_GET['httpconn']; |
| $_RSYNCCONN = $_GET['rsyncconn']; |
| $_PSERVERCONN = $_GET['pserverconn']; |
| |
| $error = ""; |
| |
| if($_HOSTNAME == "dev1" || $_HOSTNAME == "dev2" || $_HOSTNAME == "egit" || $_HOSTNAME == "ecf" || $_HOSTNAME == "cdt" || $_HOSTNAME == "mylyn" || $_HOSTNAME == "ajdt" || $_HOSTNAME == "birt" || $_HOSTNAME == "foundation" || $_HOSTNAME == "emft" || $_HOSTNAME == "asterisk" || $_HOSTNAME == "phoenix" || $_HOSTNAME == "dsdp" || $_HOSTNAME == "corona" || $_HOSTNAME == "rap" || $_HOSTNAME == "higgins" || $_HOSTNAME == "cdo" || $_HOSTNAME == "scanserv" || $_HOSTNAME == "epf" || $_HOSTNAME == "babel" || $_HOSTNAME == "pebbles" || $_HOSTNAME == "xmpp"|| $_HOSTNAME == "rtsc" || $_HOSTNAME == "modeling" || $_HOSTNAME == "torrent" || $_HOSTNAME == "newstuff" || $_HOSTNAME == "orionhub" || $_HOSTNAME == "maven" || $_HOSTNAME == "news" || $_HOSTNAME == "m2m"|| $_HOSTNAME == "polarsys") { |
| $file = fopen("/home/data/common/monitor/bandwdthavg/" . $_HOSTNAME, "w"); |
| |
| if(!$file) { |
| $error .= "Error opening Bandwidth file.\n"; |
| } |
| fwrite($file, $_DATE . " " . $_HOUR . " " . $_RXKBPS . " " . $_TXKBPS); |
| fclose($file); |
| |
| if($_L1 != "") { |
| $file = fopen("/home/data/common/monitor/loadavg/" . $_HOSTNAME, "w"); |
| if(!$file) { |
| $error .= "Error opening Load file.\n"; |
| } |
| |
| fwrite($file, $_L1 . " " . $_L2 . " " . $_L3); |
| fclose($file); |
| } |
| |
| if($_HTTPCONN != "") { |
| $file = fopen("/home/data/common/monitor/apache2/" . $_HOSTNAME, "w"); |
| if(!$file) { |
| $error .= "Error opening Apache file.\n"; |
| } |
| |
| fwrite($file, $_HTTPCONN); |
| fclose($file); |
| } |
| if($_RSYNCCONN != "") { |
| $file = fopen("/home/data/common/monitor/rsyncd/" . $_HOSTNAME, "w"); |
| if(!$file) { |
| $error .= "Error opening RSYNC file.\n"; |
| } |
| |
| fwrite($file, $_RSYNCCONN); |
| fclose($file); |
| } |
| if($_PSERVERCONN != "") { |
| $file = fopen("/home/data/common/monitor/pserver/" . $_HOSTNAME, "w"); |
| if(!$file) { |
| $error .= "Error opening PSERVER file.\n"; |
| } |
| |
| fwrite($file, $_PSERVERCONN); |
| fclose($file); |
| } |
| |
| if($error != "") { |
| echo $error; |
| exit($error); |
| } |
| |
| exit(0); |
| } |
| echo "aborting on $_HOSTNAME"; |
| exit(1); |
| ?> |