redrat Posted October 15, 2009 Author Share Posted October 15, 2009 Ah, I see. You are using the mon.itor.us widgit. Cool! I just signed up with them. 0 Quote Link to comment Share on other sites More sharing options...
Mark Caetano Posted October 16, 2009 Share Posted October 16, 2009 Has anyone found that when using the above code posted by gunermalli has slowed down generating the Server Status page quite significantly? Here's my example: http://my.akamihosting.com/serverstatus.php 0 Quote Link to comment Share on other sites More sharing options...
gunemalli Posted October 16, 2009 Share Posted October 16, 2009 (edited) Redrat, You're right on. I'ts mon.itor.us. Just love those guys. Great to have that little widget. I just would love all the others would follow suit. I Know that it's out of scope, since i have only one server i left it out there . @Mark: I think it should slow down cos you need get a lot of info on a whole lot of servers. But i'm not sure cos i have only 1 server and whmcs/severstatus files exists on the same server. So i'm not sure. Try removing the load & uptime reports. I.E the last two columns. Edited October 16, 2009 by gunemalli 0 Quote Link to comment Share on other sites More sharing options...
Mark Caetano Posted October 17, 2009 Share Posted October 17, 2009 I think it should slow down cos you need get a lot of info on a whole lot of servers. But i'm not sure cos i have only 1 server and whmcs/severstatus files exists on the same server. So i'm not sure. Try removing the load & uptime reports. I.E the last two columns. Those two are possibly the most important things for me when I'm checking Would there possibly be a way to cache the up/down status on some things and refresh it, say, every five minutes so that when the serverstatus.php is told to query, it doesn't take as long and list all services on my last server (WEB-1) as down? 0 Quote Link to comment Share on other sites More sharing options...
gunemalli Posted October 19, 2009 Share Posted October 19, 2009 Well for the thing you want to do, the best would be to use a DB+cron to update the db, and use the values from the DB to display them. That would be the best way. 0 Quote Link to comment Share on other sites More sharing options...
tracker01 Posted October 27, 2009 Share Posted October 27, 2009 can you share that script please.... 0 Quote Link to comment Share on other sites More sharing options...
plazmahost Posted October 27, 2009 Share Posted October 27, 2009 appologies to go off the topic a bit but any way to split the server status and show the server groups - engn Uk servers blah USA Servers Blah All our servers are split up into groups already 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted October 27, 2009 Author Share Posted October 27, 2009 (edited) This Mod is designed only to show those servers that are relevant to the client concerned so, if a client has a server account in two locations, that will show up. I f a client has six sites on server 1, all of those sites will be listed against that server. If that client has six sites on server 1 and two on server 3, all of that will be correctly listed. It would lose all of that functionality if your suggestion was implemented, Neath, It is never intended to list all of your servers to all clients, whether grouped or otherwise. That would defeat the whole original purpose of it. Please refer to post #1 for clarification. There are, however, other variations without the same restrictions that might be suitable for adaptation. And, I am sure that, now WHMCS supports grouping, many others would be interested in your suggestion which would certainly be useful under different circumstances. Best wishes. Edited October 27, 2009 by redrat 0 Quote Link to comment Share on other sites More sharing options...
plazmahost Posted October 28, 2009 Share Posted October 28, 2009 Appologies that is why i put in my previous post "appologies to go off topic" as i knew it wasnt related to the actual server status mentioned in this script but because you guys know how to mod it etc i thought if any 1 knew how to do it, it would be some one in this section daniel 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted October 28, 2009 Author Share Posted October 28, 2009 Not a problem Neath. It is a whole subject on its' own and could do with a whole new thread to deal with it. Best wishes. If you make it, please post a link back here and I will subscribe. 0 Quote Link to comment Share on other sites More sharing options...
vincent_g Posted October 28, 2009 Share Posted October 28, 2009 I have written an article on this on my website. There is no need to use any other code other then what's given by WHMCS http://netbizcity.com/index.php?option=com_content&view=article&id=56:customize-whmcs-status-page&catid=5:linux&Itemid=16 As we see there is a function called get_port_status So checking Cpanel would be get_port_status num="$num" port="2082" This works fine. One only need add columns for the service to check. I would remove the link to phpinfo as this is not a good idea to have. I just show the php version. Stuff you like to see along with services up is uptime, php and mysql versions and server load. 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted October 28, 2009 Author Share Posted October 28, 2009 I have written an article on this on my website. There is no need to use any other code other then what's given by WHMCS http://netbizcity.com/index.php?option=com_content&view=article&id=56:customize-whmcs-status-page&catid=5:linux&Itemid=16 As we see there is a function called get_port_status So checking Cpanel would be get_port_status num="$num" port="2082" This works fine. One only need add columns for the service to check. I would remove the link to phpinfo as this is not a good idea to have. I just show the php version. Stuff you like to see along with services up is uptime, php and mysql versions and server load. Good stuff and cheers for the useful link vincent. 0 Quote Link to comment Share on other sites More sharing options...
premierhosts Posted November 7, 2009 Share Posted November 7, 2009 I have followed the instructions to the letter to try and get this mod working in my client area bit it odes not how server time or server load! Help what am I doing wrong here. http://eastcoast-webservices.com/clients Many thanks in advance for all the excellent support on this forum. Jay Kay 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted November 7, 2009 Author Share Posted November 7, 2009 Simple; you are not using the Portal template but the Default one. Just select the Portal template in WHMCS configuration and, if you have followed the instructions in the first post,, it'll work right off the bat. Best wishes. 0 Quote Link to comment Share on other sites More sharing options...
akboselk Posted November 8, 2009 Share Posted November 8, 2009 Hi guys, Status page load fine for me without any modification (v 4.1.2). I don't have any Server but Run whole my business on Totally Reseller Servers with few reseller providers. As you know these reseller providers has tough policy on Resource usage. So will this Server status page INCREASE any Server LOAD when many client access this page to see their server status ? And How to avoid this ? (I mean restrict the visitor freequently refresh the server status pag ?) TKS 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted November 8, 2009 Author Share Posted November 8, 2009 The impact on load is very minimal. Don't worry. You cannot practically stop visitors from refreshing the page. The server status page in cPanel is much more resource hungry and that never causes a problem either. No reseller provider should have any issue with this script and, if they do, they will soon let you know. I would just relax on that score as I have never heard of anyone experience a resource problem. 0 Quote Link to comment Share on other sites More sharing options...
chrcol Posted November 15, 2009 Share Posted November 15, 2009 (edited) this seems great but is this confirmed to work in 4.1.2? for example the admin status link returns, zend version, mysql version etc. but the admin status page has no fields for this data to go in, and every field on there is blank for me even tho the actual status page does not show blank values. The security on the client page was a must and many thanks for that. Edited November 15, 2009 by chrcol 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted November 15, 2009 Author Share Posted November 15, 2009 This works fine in 4.1.2. I am not sure what you mean by 'the admin status page'? This server status is for clients to view in the Client Area of WHMCS when they click on the Server Status link. 0 Quote Link to comment Share on other sites More sharing options...
chrcol Posted November 16, 2009 Share Posted November 16, 2009 sorry, I am reffering to this. Admin Area objective 1. Very simply to be able to see all of the Server Status information that WHMCS is capable of displaying with no blank table cells. I assumed that meant the server status would be viewable in the admin area the same way as client area. and yes it works fine in my client area, so many thanks for this mod. 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted November 16, 2009 Author Share Posted November 16, 2009 (edited) Ah thanks for explaining. I have moved on from relying upon WHMCS for server monitoring from an administrative point of view and now use Nagios for much more meaningful information. If you are on a shared hosting environment, for better monitoring than WHMCS (or this mod) affords you, the server status in WHM / cPanel will give you visual clues far better than this humble little mod will. This is really just to change what your clients see. But, it has been so long since I first made this thread that I forget where I was coming from at the time. And my original images that showed what I wanted have disappeared. Check post #1 and you'll see. It would be convenient, superficially, to only have to look in the WHMCS admin area for this information. But that, I now realise, is simply asking too much of it. It is not a server monitoring application. Nagios is. I apologise that I can not remember what it was initially I tried to help people with in the admin area. If you could upload a screen shot it will remind me and I will do my best to help you. Best wishes. Chris. Edited November 16, 2009 by redrat 0 Quote Link to comment Share on other sites More sharing options...
chrcol Posted November 17, 2009 Share Posted November 17, 2009 yes this isnt for my own monitoring purpose I also use nagios myself. I assumed the admin area would match what is seen in the client area with the exception it would always show all servers. Since to test if the server status works in the client area I have to login as a client. So seeing it in the admin area would save time in that respect. It not working as I expected in the admin area is nothing too important, the main thing was doing as your mod did which was to (a) remove phpinfo and (b) stop it from been a publicly viewable area. 0 Quote Link to comment Share on other sites More sharing options...
redrat Posted November 17, 2009 Author Share Posted November 17, 2009 Hi chrcol. I must have had a blonde moment the other day. In fact, this mod has no bearing at all on the server status monitor that you see in WHMCS admin area and I should have remembered that immediately. It only modifies what the client sees. That being the case, this mod appears to be working fine for you. It is a separate issue that you have and I recommend firing off a ticket to Matt and crew to resolve it. By the way, the admin version is a different type of display anyway. Sorry I didn't twig this straight away. I'm glad you wanted to remove the php.info link because many don't and it's a bit dodgy to have it there really, as you know. 0 Quote Link to comment Share on other sites More sharing options...
epicconstruct Posted February 16, 2010 Share Posted February 16, 2010 (edited) Here's another version I wrote up. It's based on WHMCS 4.1.2 version of the template. It turns off the PHP Info link, and adds a few extras (basically the same ones as the other script). It's a little bit shorter and cleaner, as it keeps all of the template code separate, it also loads the existing login.tpl so you don't have to maintain it in an additional place. Also, if you want to turn off the PHP Info, don't forget to edit the status/index.php file too. Someone can still access the PHP info by going to /status/index.php?action=phpinfo unless you comment out the phpinfo line in the file by putting a // in front of phpinfo();. {php} $query = "SELECT DISTINCT tblservers.name FROM `tblservers` JOIN `tblhosting` ON tblhosting.server=tblservers.id WHERE tblhosting.userid='".$_SESSION["uid"]."' AND tblhosting.domainstatus='Active'"; $result = mysql_query($query); $servers_new = array(); $server_names = array(); while ($data = mysql_fetch_array($result,MYSQL_ASSOC)) { $server_names[] .= $data['name']; } $servers_old = $this->_tpl_vars[servers]; foreach ($servers_old AS $key=>$value) { if (in_array($value['name'],$server_names)) $servers_new[] = $value; } $this->clear_assign('servers'); $this->assign('servers',$servers_new); {/php} {if $loggedin} <p>{$LANG.serverstatusheadingtext}</p> <table width="100%" border="0" align="center" cellpadding="10" cellspacing="0" class="data"> <tr> <th>{$LANG.servername}</th> <th>HTTP</th> <th>FTP</th> <th>POP3</th> <th>IMAP</th> <th>SMTP</th> <th>cPanel</th> <th>{$LANG.serverstatusserverload}</th> <th>{$LANG.serverstatusuptime}</th> </tr> {foreach key=num item=server from=$servers} <tr> <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>{get_port_status num="$num" port="143"}</td> <td>{get_port_status num="$num" port="25"}</td> <td>{get_port_status num="$num" port="2082"}</td> <td>{$server.serverload}</td> <td>{$server.uptime}</td> </tr> {foreachelse} <tr> <td colspan="8">{$LANG.serverstatusnoservers}</td> </tr> {/foreach} </table><br /> {else} {assign var='formaction' value='dologin.php?goto=serverstatus'} {include file="$template/login.tpl"} {/if} Redrat, thanks for the script. I'm not trying to steal your thunder, just offer another method. Thanks for the inspiration and some really good ideas. Edited February 16, 2010 by epicconstruct 0 Quote Link to comment Share on other sites More sharing options...
Keiro Posted February 16, 2010 Share Posted February 16, 2010 redrat: Now I know why I could never get the two ports to show up as open a while back. I had an "AHA!" moment today and opened the ports. Right after that, I checked the status page, and sure enough, they showed as up. Which means, if it's still showing as down when everything else is up, CHECK YOUR PORTS! 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 17, 2010 Share Posted February 17, 2010 I have this script setup to monitor additional ports on 2 servers. I have shell_exec and exec disabled on both servers. One the server where whmcs runs, I get all the info for extars like php/mysql ver, imap, cpanel ports. However, on the remote server, I do not get server load, imap and cpanel show offline(even though they are online). I do get php/mysql versions. Is this possibly a firewall 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.