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? Also is there a reason why the initial mods will only work with a portal template? I tried this with my custom template and get no data other than the port headings. 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 17, 2010 Share Posted February 17, 2010 Well done boys. Just a tip, though. Rather than have the client run all over the site looking for infromation, why not drop a couple of includes into the client area home page to give them a summary. (Disclaimer:- this is great for small clients, but not so good for resellers or clients with hundreds of domains etc) eg. {include file='serverstatus.tpl'} {include file='upcomingdomainrenewal.tpl'} {include file='recentannouncements.tpl'} {include file='clientareanotes.tpl'} Plus a couple of other customs, as per the screenshot, notes, etc Drop in a couple of hyperlinks to the relevant sections, and you have a nice one page snapshot summary of the client. This is good in theory, but the status page takes a few seconds to load if you have added info. This will drag down client area home. 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 17, 2010 Share Posted February 17, 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! Check your ports where? In the firewall? What exactly did you do? My server status page can not see smtp, imap and cpanel. I have no problem on the local server that whmcs resides on, just the remote one. 0 Quote Link to comment Share on other sites More sharing options...
Keiro Posted February 18, 2010 Share Posted February 18, 2010 Check your ports where? In the firewall? What exactly did you do? My server status page can not see smtp, imap and cpanel. I have no problem on the local server that whmcs resides on, just the remote one. Yes, in the firewall. I should've been more clearer. I had the "AHA!" moment and tried opening the ports in the firewall to see if the script would see them as up, and sure enough, it did. I'm curious, how do we add more ports to check without mangling up the display? 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 18, 2010 Share Posted February 18, 2010 I'm a little confused, where in the firewall did you open the ports? TCP, UDP,etc? I mean SMTP would have to be open in the firewall for it to work, so where else did you open the port? 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 18, 2010 Share Posted February 18, 2010 This is good in theory, but the status page takes a few seconds to load if you have added info. This will drag down client area home. OK. I had the AHA moment too. I was too concerned with the remote firewall and not the local firewall. I opened the outbound ports for the additional services. They all work with the exception on SMTP. 0 Quote Link to comment Share on other sites More sharing options...
Keiro Posted February 19, 2010 Share Posted February 19, 2010 OK. I had the AHA moment too. I was too concerned with the remote firewall and not the local firewall. I opened the outbound ports for the additional services. They all work with the exception on SMTP. TCP. Outbound, as you've noticed. SMTP... I believe you'd need to check for the ports you use if you're not using the standard ports for SMTP. 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 19, 2010 Share Posted February 19, 2010 I had to allow the remote server access in the csf allow file. Now it works. 0 Quote Link to comment Share on other sites More sharing options...
JumpNetwork Posted February 20, 2010 Share Posted February 20, 2010 Thanks Guys, that is exactly what I needed, great work!!!!! 0 Quote Link to comment Share on other sites More sharing options...
knipper Posted February 23, 2010 Share Posted February 23, 2010 (edited) TCP. Outbound, as you've noticed. SMTP... I believe you'd need to check for the ports you use if you're not using the standard ports for SMTP. I too am getting an SMTP problem. I am not using the standard port, and corrected it in the file prior to uploading. Suggestions anyone? PS... I'm using the code from post #88 Edited February 23, 2010 by knipper 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 23, 2010 Share Posted February 23, 2010 I too am getting an SMTP problem. I am not using the standard port, and corrected it in the file prior to uploading. Suggestions anyone? PS... I'm using the code from post #88 Did you check if you have the server(if remote) in the firewall allow file? 0 Quote Link to comment Share on other sites More sharing options...
knipper Posted February 23, 2010 Share Posted February 23, 2010 Did you check if you have the server(if remote) in the firewall allow file? Hi rldev, Thanks for the response. Nope, it's on this server, not remote. But I do have CSF firewall, locking it down pretty tightly. I tried adding the SMTP port to my tcp_out allowed area. (it obviously was in my tcp_in config) I deleted the templates_c directory, and dumped my browser cache, but still no smtp. Any additional suggestions? 0 Quote Link to comment Share on other sites More sharing options...
rldev Posted February 23, 2010 Share Posted February 23, 2010 Can you telnet into port 25? telnet server 25 0 Quote Link to comment Share on other sites More sharing options...
knipper Posted February 24, 2010 Share Posted February 24, 2010 Can you telnet into port 25? telnet server 25 Sorry for the late reply, I was working with no web access! I am able to telnet locally on the server to both port 25 & 26 (Where I have smtp set up). 0 Quote Link to comment Share on other sites More sharing options...
jmfemedia Posted March 10, 2010 Share Posted March 10, 2010 is there anyway of making the server status page work OUTSIDE of the WHMCS install directory? I am currently working on a new version of my site and I was wanting to put it on the server spec page and I dont really wanna have that page running on the whmcs 0 Quote Link to comment Share on other sites More sharing options...
dewknight Posted March 24, 2010 Share Posted March 24, 2010 Sorry for the late reply, I was working with no web access! I am able to telnet locally on the server to both port 25 & 26 (Where I have smtp set up). You probably have SMTP_BLOCK enabled in CSF. This blocks outgoing access to port 25 / 26. Since by default you are using the domain or server hostname to connect, it will be blocked. You need to change the hostname for connecting to SMTP to 'localhost' 0 Quote Link to comment Share on other sites More sharing options...
fakher Posted June 10, 2010 Share Posted June 10, 2010 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. i pasted this code in serverstatus.tpl but getting this in return The table below shows the status of our server. You can use this page to check if any of the services on our servers are down.Server HTTP FTP POP3 IMAP SMTP cPanel Server Load Uptime No Servers are currently being monitored Can some one help me on this? I have placed http://www.xlxhost.com/status/ in my server configuration page. 0 Quote Link to comment Share on other sites More sharing options...
epicconstruct Posted June 11, 2010 Share Posted June 11, 2010 i pasted this code in serverstatus.tpl but getting this in return Can some one help me on this? I have placed http://www.xlxhost.com/status/ in my server configuration page. The script that I had attached is configured to only display server info for the server that the logged in user has an account. If you're logged out or the logged in user does not have an appropriate package then no data will be returned. I hope that helps. 0 Quote Link to comment Share on other sites More sharing options...
fakher Posted June 11, 2010 Share Posted June 11, 2010 The script that I had attached is configured to only display server info for the server that the logged in user has an account. If you're logged out or the logged in user does not have an appropriate package then no data will be returned. I created a test user account tested it but it was not working. the logged in user does not have an appropriate package then no data will be returned. What do you mean by package? and also do i have to change my status/index.php too? 0 Quote Link to comment Share on other sites More sharing options...
dannyl Posted December 6, 2010 Share Posted December 6, 2010 Hi What am I doing wrong? I've entered it as instructed. But if I make a port change does not change the status image. For example, from CPanel Port 2082 to Virtualmin Port 10000 0 Quote Link to comment Share on other sites More sharing options...
RFEHosting Posted January 5, 2011 Share Posted January 5, 2011 Will this work with 4.4.1? Has anyone done any script updates to it? 0 Quote Link to comment Share on other sites More sharing options...
dannyl Posted January 7, 2011 Share Posted January 7, 2011 Yes, this works also with 4.4.1 Meanwhile, I also did it. It was in the wrong servers.php setting. 0 Quote Link to comment Share on other sites More sharing options...
paperweight Posted August 4, 2012 Share Posted August 4, 2012 Hmmm, when I include {include file='yourtemplatename/supportticketslist.tpl'} in the homepage.tpl says "No Records Found". But I do have multiple tickets. Any idea why the database does not seem to be queried correctly on this? 0 Quote Link to comment Share on other sites More sharing options...
Manchester Web Hosting Posted September 4, 2012 Share Posted September 4, 2012 is this working in the very latest version of whmcs? Need it for one of our clients... 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.