Jump to content

Server Status for Windows Servers - Something is better than nothing


Recommended Posts

Hello all,

 

I wanted to share a quick workaround for the Server Status page for those that have Windows Servers.

 

The Problem:

If you are not already aware the 'Server Status' for WHMCS only works correctly with Linux endpoints. This is a language issue and not a WHMCS issue.

 

The Impact:

So...if you were to input the server status folder path (http://www.yourdomain.com/status) into the 'Server Status Address' within the Server configuration page it does work, however it creates more issues than it resolves. This is down to the status code only being able to pick up the port checks so 110/80 etc. The only issue is that because it does not pick up the 'Uptime' or 'Server Load' upon inspection by an untrained eye...i.e. your customer, it looks like the server has an issue as it will report as unavailable for the Load and register an Uptime of 00:00. This obviously can cause alarm to the customer.

 

We used to just not populate the Server Address within the status field so that it showed nothing if anyone looked, however we decided that something was better than nothing...but did not want to cause any support tickets coming in with clients wondering what the 00:00 was.

 

The Workaround:

So....something is better than nothing for us Windows Server users! We decided that we would simply remove the offending code from the server status page and show what was working. In all honesty a client would only look at the nice shiny green ticks under POP3/HTTP etc anyway :roll:

 

We also decided to remove the link for the PHP INFO. This is something that you may or may not want to do...it's entirely your choice.

 

Before starting any changes remember to take a backup!!! ;)

 

To remove the code, find the 'serverstatus.tpl' file located in /templates/YourTemplateName/

 

Remove the following code:

 

Lines 72-74

            <th class="textcenter">{$LANG.serverstatusphpinfo}</th>
           <th class="textcenter">{$LANG.serverstatusserverload}</th>
           <th class="textcenter">{$LANG.serverstatusuptime}</th>

 

Lines 84-86

           <td class="textcenter"><a href="{$server.phpinfourl}" target="_blank">{$LANG.serverstatusphpinfo}</a></td>
           <td class="textcenter" id="load{$num}"><img src="images/loadingsml.gif" alt="{$LANG.loading}" /></td>
           <td class="textcenter" id="uptime{$num}"><img src="images/loadingsml.gif" alt="{$LANG.loading}" />

 

Be careful on Line 86. Do not remove the '<script>' or anything after it. In all honesty that should be on the next line down but as long as it's left there it will be fine.

 

Save and upload (AFTER TAKING A COPY OF THE ORIGINAL!).

 

You will be left with this:

 

serverstatus.PNG

 

Yes, it does not have the Load or Uptime...but it has SOMETHING!

 

Just to note...you could always replace the Server Load and Uptime with another check such has a different port and rename....just a thought for now :lol:

 

Hopefully this helps someone! This is just our way of resolving this issue....I am sure there a more ways...potentially cleaner coding ways too!

Edited by CCSupport
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated