Jump to content

Server Status Questions


jerett

Recommended Posts

Greetings Gang!

 

I wanted to ask you all a few questions regarding the Server Status script used with WHMCS.

 

My first question: does anyone know how you would alter the template to show the following:

 

a) only the server that particular client is on that is logged in along with uptime.

 

b) what os is being used (windows, linux) and to do a small pic of tux.

 

My next question: is there away to get uptime working even though my registrars required to be enabled .... are disabled for security reasons?

 

Any suggestions?

 

Thanks gang!

 

Jerett

Link to comment
Share on other sites

You will need to do a small sql query to find out which box the user is on. Once you have that information, you can match the server in the foreach clause and print out the details if it matched.

 

For the os used, you can do it hardcoded, or get the OS from the server itseld.

 

Hardcoding it is easiest, if you only have a few servers and are not an active host.

 

Once you have your OS, you can do an if else to show your TUX or Windows image.

 

Otherwise, you will need to write a new status script and include all the details you wish to show, then rewrite the serverstatus.php to query and parse the info your new status script provides.

 

The possibilities of this are limitless, if you know some perl or sh for instance, you could get absolutely anything you want, by running it as a wheel group user or root.

 

-

 

In summary, showing only the server(s) used in the account is easy to do.

Showing the OS hardcoded in your smarty code is also easy.

Showing a little Tux image, is as simple as determining the OS first, then if it matches, show the corresponding image.

 

For the other approaches, you'll need some programing skills.

Link to comment
Share on other sites

There are a few users here who have added headers and footers to the output .. I think that is pretty easy.

 

If you use that program, you probably wouldn't use WHMCS' serverstatus.php.

 

For your original question, the easiest solution is not querying for anything and just hardcoding the server type or OS in your conditional statement :

 

{if $server.name == "mywindowsbox"}

 

<img src=win.gif> Windows Enterprise Server 2003

 

{elseif $server.name == "mylinuxbox"}

 

<img src=tux.gif> Linux Red Hat Enterprise 4.4

 

{/if}

Link to comment
Share on other sites

that's a pretty neat script :)

 

The script is nice , but

 

1.if you really want to show server full details with this script you have to install it on every server you have .

2.and if you want to show services status (only 4 service of your choice) + server load and uptime then you have to upload the folder "multiservers" to every server you want to show in the status page.

and then will showup in the main server. otherwise if you do not upload the the "multiservers" folder to the other servers , it willshow the server load and uptime where it is installed .

 

i hope what i said is not too complicated :)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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