Beatle Posted July 8, 2008 Share Posted July 8, 2008 Hello again, I was hoping someone could tell me how I get the server load and uptime to show up in the server status section of WHMCS? Right now, as you can see from this, it only shows the status of the http, FTP, and POP3. Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
mediademon Posted July 8, 2008 Share Posted July 8, 2008 Add me for this too! Running 2003 server ... mediademon 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 I'm assuming that it cannot be done since no one answered? 0 Quote Link to comment Share on other sites More sharing options...
mountainhost Posted July 12, 2008 Share Posted July 12, 2008 I am a bit confused by your questions, I am running WHMCS 3.6.1 and my serverstatus.php shows everything, as does the admin page. What is your version and where are you not seeing what you should be seeing? By the way, serverstatus.php is encoded, so you will not see any info relating to your question being posted soon, unless its in one of the template files. 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 I believe I have 3.6.2. You can see what I mean at http://afreewebhost.com/clients/serverstatus.php It shows the up and down status of http, ftp, and POP3, but server load and uptime just say "Not Available". Thanks for the reply! 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted July 12, 2008 Share Posted July 12, 2008 Have a look in the User Contributions section. Here's a link to the one that I use here at Hands-on: http://forum.whmcs.com/showthread.php?t=7192&page=3&highlight=WHMCS+server+status Works like a charm for our clients and servers. You MUST setup the "status" script that comes with WHMCS in the /status folder. That must be on your individual servers that you want to monitor for LOAD etc. Have a look in the WIKI for more information on that. 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 I'm going to try it, but I am doubtfull it will work with my version since it was developed for v3.5. I'll post back here and let you all know what happens 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 Ok, I did the edit that showed the uptime and load (in the screenshot), but it still does not show it on mine!? It does show more info when the user is logged in, but still the same when not logged in. The only difference when the user isn't logged in is that it shows a loggin form. Here is what I have now::: When the user is logged in>> When the user is not logged in>> I had to edit the code a little to get the images to show up, but here is what I have in the serverstatus.tpl file: {if $loggedin} <p>{$LANG.serverstatusheadingtext}</p> <table class="clientareatable" align="center" cellspacing="1"> <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>HTTP</td> <td>FTP</td> <td>POP3</td> <td>{$LANG.serverstatusphpinfo}</td> <td>{$LANG.serverstatusserverload}</td> <td>{$LANG.serverstatusuptime}</td> </tr> {foreach key=num item=server from=$servers} <tr class="clientareatableactive"> <td>{$server.name}</td> <td>{get_port_status num="$num" port="80"}</td> <td>{get_port_status num="$num" port="21"}</td> <td>{get_port_status num="$num" port="110"}</td> <td><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo}</a></td> <td>{$server.serverload}</td> <td>{$server.uptime}</td> </tr> {foreachelse} <tr class="clientareatableactive"> <td colspan="7">{$LANG.serverstatusnoservers}</td> </tr> {/foreach} </table> <p>The table below shows the status of your domains and which server they are hosted on.</p> <table class="clientareatable" align="center" cellspacing="1"> <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>HTTP</td> <td>HTTPS</td> <td>FTP</td> <td>POP3</td> <td>SMTP</td> <td>IMAP</td> </tr> <tr> {php} //echo "<pre>"; //print_r($_SESSION); //echo "</pre>"; $query = "SELECT * FROM tblhosting WHERE userid='".$_SESSION["uid"]."' AND domainstatus='Active'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { // echo "<pre>"; // print_r($row); // echo "</pre>"; $activeserver = $row['server']; $hosteddomain = $row['domain']; $query2 = "SELECT * FROM tblservers WHERE id='".$activeserver."'"; $result2 = mysql_query($query2); $row2 = mysql_fetch_array($result2); // echo "<pre>"; // print_r($row2); // echo "</pre>"; //HTTP $fp = fsockopen($row['domain'],80,$errno,$errstr,10); if(!$fp) { echo '<tr class="clientareatableactive">'; echo "<td>( " .$row['domain']. " ) - " .$row2['name']."</td>"; echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<tr class=\"clientareatableactive\">"; echo "<td>( " .$row['domain']. " ) - " .$row2['name']."</td>"; echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } //SSL $fp = fsockopen('ssl://'.$row['domain'],443,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } //FTP $fp = fsockopen($row['domain'],21,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } //POP3 $fp = fsockopen($row['domain'],110,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } //SMTP $fp = fsockopen($row['domain'],25,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statuswarning.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } //IMAP $fp = fsockopen($row['domain'],143,$errno,$errstr,10); if(!$fp) { echo "<td><img src=\"images/statusfailed.gif\"></td>"; }else{ echo "<td><img src=\"images/statusok.gif\"></td>"; fclose($fp); } } {/php} </tr> </table> {else} <p>{$LANG.serverstatusheadingtext}</p> <table class="clientareatable" align="center" cellspacing="1"> <tr class="clientareatableheading"> <td>{$LANG.servername}</td> <td>HTTP</td> <td>FTP</td> <td>POP3</td> <td>{$LANG.serverstatusphpinfo}</td> <td>{$LANG.serverstatusserverload}</td> <td>{$LANG.serverstatusuptime}</td> </tr> {foreach key=num item=server from=$servers} <tr class="clientareatableactive"> <td>{$server.name}</td> <td>{get_port_status num="$num" port="80"}</td> <td>{get_port_status num="$num" port="21"}</td> <td>{get_port_status num="$num" port="110"}</td> <td><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo}</a></td> <td>{$server.serverload}</td> <td>{$server.uptime}</td> </tr> {foreachelse} <tr class="clientareatableactive"> <td colspan="7">{$LANG.serverstatusnoservers}</td> </tr> {/foreach} </table> <p>You must login to view detailed Server Statistics! These login details differ from your websites control panel username and password. </p> <form action="dologin.php?goto=serverstatus" method="post"> <table align="center"> <tr><td align="right">{$LANG.loginemail}:</td><td><input type="text" name="username" size="40" value="{$username}"></td></tr> <tr><td align="right">{$LANG.loginpassword}:</td><td><input type="password" name="password" size="25" value="{$password}"></td></tr> </table> <p align="center"><input type="submit" value="{$LANG.loginbutton}"><br><input type="checkbox" name="rememberme"{$rememberme}> {$LANG.loginrememberme}</p> </form> <p><b>{$LANG.loginforgotten}</B> <a href="passwordreminder.php">{$LANG.loginforgotteninstructions}</a>.</p> {/if} Anyone know how I can get it so show the uptime and load when the user is logged or not? I would be happy if I could just get it to show either way! Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 I just noticed that if you click on the php info link, it shows the load, uptime, php version, and something else. Here is what you see when you click on the php info link>>> 0.53 1 Days 15:13:09 5.2.6 5.0.51a 2.2.0 You can see this for yourself at http://afreewebhost.com/clients/serverstatus.php EDIT: I took out the php info link, but when I took out the whole line, it showed a grey box under the uptime section. So, I took out just the link to the php info, but I would like to remove the whole php info block. This is what I had: <td><a href="http://afreewebhost.com/status/index.php" target="_blank">{$LANG.serverstatusphpinfo}</a></td> And this is what I did: <td></td> If I take out the <td></td> it shows the grey block under uptime. 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted July 12, 2008 Share Posted July 12, 2008 For the PHP info part - when you removed that link, and the <TD></TD> around it, did you remember to move it from the table header also further up in the code? <td>{$LANG.serverstatusphpinfo}</td> Remove both of those and that should take care of that for you. With regards to some stuff showing when logged in, and some that's not, check the very top of the file, it says {if $loggedin} . Code in this section will ONLY show when logged in. Then if you look further down there's an {else} section. If you want to show EVERYTHING to EVERYONE, just remove the if loggedin line, then delete everything from the ELSE to the bottom of that section (including the {/if} That will display everything without the login necesary etc. I use it here on 3.6.1 with no issues, however I tweaked ours to not display anything unless a user is logged in. 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 Ok great, thanks for the info. So yours shows the uptime and load? I cannot get mine to do it, I have no idea why! It seems other people were able to get it to work with the same code 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted July 12, 2008 Share Posted July 12, 2008 Did you put the status.tar file on the server that you wanted to view the load? Did you update the server configurations in your WHMCS with the location of where the status file is located (main admin page only). After you setup that status scrpt if you click on the "Check Network Status" from your main page in WHMCS does it show the load through there? If not, what is the link to your status page on your server? Does it show the status through that link or give an error? 0 Quote Link to comment Share on other sites More sharing options...
Beatle Posted July 12, 2008 Author Share Posted July 12, 2008 Yes, and yes. When I click on network status it shows the percentage used and that the servers are online, but under but under load and uptime there is just a - there. http://afreewebhost.com/clients/serverstatus.php is the link to the status page, and no, it doesn't show any errors, it just says "Not available" from that link. 0 Quote Link to comment Share on other sites More sharing options...
handsonwebhosting Posted July 13, 2008 Share Posted July 13, 2008 If it's only showing a "-" then that means one of two things: The page can't be opened and the PHP can't be executed, or the most common, your BILLING IP number is blocked in your destination server. Check your firewall and make sure that the IP number was added to ALLOW excessive login attempts I used to forget about that one on various server setups, but that's the next thing to check. If it's showing in your browser with the UPTIME status (meaning the RAW information is being returned), but not working in your WHMCS, then it's likely the IP being blocked. http://afreewebhost.com/clients/serverstatus.php -- this page didn't even load up for me 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 17, 2010 Share Posted February 17, 2010 The problem I have is on one server I get uptime, but not server load and it can not properly read smtp and cpanel ports. On the local server whmcs is running on, this is a non issue, everything works. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted February 17, 2010 Share Posted February 17, 2010 Previous response was a long time ago (07-13-08 ). Maybe you'd benefit from making a new thread with this issue? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.