# Server management system



## Novacha (Aug 26, 2013)

As the amount of virtual servers I own increased, I had trouble keeping track of them, what their purpose was and all their details (cost, memory, etc.). I used to keep an excel spreadsheet, but it wasn't able to do a lot of what I wanted. Over the week or so, I have been working on a server management system and I just wanted to showcase where it is at here.

Initially, it started pretty basic with just keeping track of servers and their various details, but now it sports a few more features:


Ping checking with history, email notifications and status badges
Solus VM integration
Rather than typing data in yourself, this system can pull in all of the data the SolusVM API makes available
Pull all IP address from solus
Pull HDD space from solus
Pull RAM amount from solus
Direct implementation of solus page
[*]General Management

Servers can have a purpose
Servers show the time left with a progress bar

It is built on Django and uses Bootstrap V3. I posted some screenshots to give you a better example of what it is all about:

Homepage / Server List



Specific servers

Server Details



Server Specs



Server uptime



Server purpose



Server SolusVM integration (pulls data from SolusVM)



Server Admin

The images below are split because the page was too tall for one screenshot.









Both the email notifications when the server goes down or up





Currently, the source is hosted in a private repository (Bitbucket) but if people want, I can upload it to Github. The code is now on Github! This is still way before any type of formal versioned release. Since this uses the Django framework, it is harder to deploy than a simple PHP script. If I release it on Github, I will post installation instructions for Debian and Ubuntu systems. Debian and Ubuntu instructions are now online! The docs are at https://server-listing.readthedocs.org

Here is the link to the git repository:

https://github.com/ServerListing/Server_Listing


----------



## bizzard (Aug 26, 2013)

This one looks cool. Please go ahead and make it public. I would like to give it a try.


----------



## drmike (Aug 26, 2013)

Wow, looks quite nice!

Definitely interested.


----------



## Jade (Aug 26, 2013)

Looks pretty nice, would love to see it released!


----------



## Novacha (Aug 26, 2013)

I have added a link to the Github in the above post at the end. I have not written the documentation yet, but it is in the works.


----------



## stim (Aug 26, 2013)

Great stuff!


----------



## Afterburst-Charlie (Aug 26, 2013)

Nice project of yours, seems to do the job quiet well.


----------



## Novacha (Aug 26, 2013)

The docs are now online! They are hosted with readthedocs and are at

https://server-listing.readthedocs.org/en/latest/

Currently only installation is covered, but I am writing the sections for management and uninstalling.


----------



## Novacha (Aug 26, 2013)

The rest of the documentation is written and is up. If you have any troubles along the way, let me know so I can write it into the documentation.


----------



## Boltersdriveer (Aug 26, 2013)

Novacha said:


> The rest of the documentation is written and is up. If you have any troubles along the way, let me know so I can write it into the documentation.


Very nicely done script with great documentation written and set up. Will be setting this up in a while and reporting on my experience.


----------



## Novacha (Aug 26, 2013)

Boltersdriveer said:


> Very nicely done script with great documentation written and set up. Will be setting this up in a while and reporting on my experience.


It would be great to hear how that goes! If you have any troubles during installation, let me know.


----------



## peterw (Aug 26, 2013)

Great tool.

I like the Python documentation generator too.


----------



## Novacha (Aug 26, 2013)

peterw said:


> Great tool.
> 
> I like the Python documentation generator too.


It's called sphinx. You should really go check it out! It uses reStructuredText and can pull your docstrings in to generate developer documentation.


----------



## 365Networks (Aug 27, 2013)

This looks great and I really love the fact that is it open source! Hell yea!


----------



## drmike (Aug 27, 2013)

Someone downloaded this and have it up and running?

Anyone have install steps to share for this?


----------



## Pmadd (Aug 27, 2013)

@buffalooed, I got it up and running last night. The install steps were more or less the same as the ones listed in the install guide, but there were some difficulties with a few packages and thanks [email protected] for spending time with me to help fix the issues.


----------



## 365Networks (Aug 27, 2013)

I assume the automatic installer isn't quite ready yet? I am installing manually now.


----------



## clarity (Aug 27, 2013)

I am getting an error with PIP on Debian Wheezy. Anyone have any ideas?

I got it. I needed python-dev.


----------



## Pmadd (Aug 27, 2013)

I had that error yesterday, could you show the output?


----------



## drmike (Aug 27, 2013)

Oh are we having an install party  ?   

Someone document their Debian installation please and we'll post it as a tutorial --- or you can.


----------



## Pmadd (Aug 27, 2013)

Just something to add, its tricky to install this on Debian but it's a lot easier on Ubuntu.


----------



## Novacha (Aug 27, 2013)

dclardy said:


> I am getting an error with PIP on Debian Wheezy. Anyone have any ideas?
> 
> I got it. I needed python-dev.


As of right now, it seems the automatic installer only works on Ubuntu. It should have installed python-dev for you. Would you be able to show me the error, so that I can apply a fix?



buffalooed said:


> Someone downloaded this and have it up and running?
> 
> Anyone have install steps to share for this?


The install docs are on the documentation page. Right now there seem to be some issues with Debian, so the automatic installer is only working on Ubuntu. If you send me a PM, I am more than happy to guide you through a manual setup (the documentation for that is not quite written yet).


----------



## Novacha (Aug 27, 2013)

Pmadd said:


> Just something to add, its tricky to install this on Debian but it's a lot easier on Ubuntu.


On Ubuntu right now, it should be basically a 1-click install. I am still looking into issues with a Debian install (I might reinstall a dev VPS to Debian and go from there).


----------



## clarity (Aug 27, 2013)

I'll try to find that error again. All I did was create a blank VPS with Debian 7, apr-get install python-2.7 python-pip git. I did a git clone as instructed and then ran the pip command to install fabric. That is as far as I got before I got another error.


I am going to try on Ubuntu.


----------



## 365Networks (Aug 27, 2013)

By the way, if you are installing the fabric pip package, you will need python2.7-dev, gcc, and some other packages you can easily get from apt-get


----------



## Novacha (Aug 27, 2013)

dclardy said:


> I'll try to find that error again. All I did was create a blank VPS with Debian 7, apr-get install python-2.7 python-pip git. I did a git clone as instructed and then ran the pip command to install fabric. That is as far as I got before I got another error.
> 
> 
> I am going to try on Ubuntu.


You should do the deploy from your local machine. The way it works is that you clone the repo to your computer, enter in the details to your server and let it do all the installation for you (packages, configuration files, etc.). 



365Networks said:


> By the way, if you are installing the fabric pip package, you will need python2.7-dev, gcc, and some other packages you can easily get from apt-get


If you do the install from your local machine (which should have the python packages installed) this setup will install everything that is needed to run the site.


----------



## clarity (Aug 27, 2013)

I think that I figured that out now. You still have to install mysql though correct?

Also, what is the default username and password? A select on the users table shows a user named admin, but I don't know the password. This is not what is currently listed on the installation instruction site.

Edit:

The password is: pass. I setup a new user and then deleted the admin account, and I can't login anymore. Oops!

I am getting stuck at http://example.com/admin. I can't login there at all!


----------



## Novacha (Aug 27, 2013)

dclardy said:


> I think that I figured that out now. You still have to install mysql though correct?
> 
> Also, what is the default username and password? A select on the users table shows a user named admin, but I don't know the password. This is not what is currently listed on the installation instruction site.


Yes you have to install a MySQL server if don't have one already (and create the database). It will install all the packages to be able to connect to that server though.

The default user is *admin* and the password is *pass*. I will post a fix to the documentation.

*Edit:*

The documentation is now fixed!


----------



## clarity (Aug 27, 2013)

@Novacha Thanks for the information. Can you answer my edit?


----------



## Novacha (Aug 27, 2013)

dclardy said:


> @Novacha Thanks for the information. Can you answer my edit?


The new user you created was probably not a superuser. The default permission level for a user is without any admin access. You need to update the field with a SQL query:


UPDATE `auth_user` SET is_staff=1, is_superuser=1 WHERE username='YOUR_USERNAME';
*Edit:*

If anyone else wants to create a new user make sure the staff and superuser checkboxes are checked on the new user page.


----------



## clarity (Aug 27, 2013)

Alright the staff setting is what I was missing. I got the superuser part!


----------



## Novacha (Aug 31, 2013)

So, does anyone have any feature requests, after they have used it for a bit? I am planning on doing a UI update sometime in the future.


----------



## shovenose (Aug 31, 2013)

Nicely done! I'm assuming servers can also be manually added if they aren't SolusVM based? This could actually be useful for dedicated servers as well.


----------



## Novacha (Aug 31, 2013)

shovenose said:


> Nicely done! I'm assuming servers can also be manually added if they aren't SolusVM based? This could actually be useful for dedicated servers as well.


Yep. This was actually developed initially without SolusVM support. That came in later and is entirely optional. This will work with dedicated servers as well since it just pings the IP address.


----------



## shovenose (Aug 31, 2013)

Novacha said:


> Yep. This was actually developed initially without SolusVM support. That came in later and is entirely optional. This will work with dedicated servers as well since it just pings the IP address.


Awesome, thanks!


----------



## WebSearchingPro (Aug 31, 2013)

I was reading this on my phone and was like - I have to get on my computer to say how awesome this is!

This looks like a great project, even with the fact that many providers are closing off SolusVM in one way or another.

Another option could maybe be a small lightweight python agent running on a single port with a .sh script to install it - simple, easy, not relying on other services.

Can't wait to try it out.


----------



## Novacha (Aug 31, 2013)

WebSearchingPro said:


> I was reading this on my phone and was like - I have to get on my computer to say how awesome this is!
> 
> 
> This looks like a great project, even with the fact that many providers are closing off SolusVM in one way or another.
> ...


I can see why a lot of providers would be closing off SolusVM. If the application is in any state like the one their API is in (appalling) then it mustn't be that great (I am talking from an administration point of view). Plus there are all those pesky security issues..

I am not quite sure what you mean with the python agent. Are you looking for something that relays the server's details or that determines if the server is up or down (via handshaking over the port)?


----------



## WebSearchingPro (Aug 31, 2013)

Novacha said:


> I can see why a lot of providers would be closing off SolusVM. If the application is in any state like the one their API is in (appalling) then it mustn't be that great (I am talking from an administration point of view). Plus there are all those pesky security issues..
> 
> I am not quite sure what you mean with the python agent. Are you looking for something that relays the server's details or that determines if the server is up or down (via handshaking over the port)?


Thanks for the reply

If youve ever used something like GFI RemoteManagement or Kaseya or Bomgar - all for Microsoft products. Its basically the same thing.

What you do is you install a small program on your server that gathers data on the local machine and sends it to the server with the control panel on it.

Monitored metrics:

HDD

CPU

Memory

Network

Packets dropped

As well as controlled from a remote panel:

Copying files.

Running commands.

Rebooting.

The agent would act like a packager that collects all the local statistics send it elsewhere to be collected. But it can also receive commands and execute them.

I've not seen anything particularly like this in the Linux world. 

It would obviously need to be very secure as well as light weight,


----------



## Novacha (Aug 31, 2013)

WebSearchingPro said:


> Thanks for the reply
> 
> If youve ever used something like GFI RemoteManagement or Kaseya or Bomgar - all for Microsoft products. Its basically the same thing.
> 
> ...


That could be possible. I will see what I can do!


----------



## billingspc (Aug 31, 2013)

Thanks. This project looks very cool. I setup a vps to test out. However during the install running into an error. 



/server_listing# fab make_deploy
Traceback (most recent call last):
  File "/usr/local/bin/fab", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pycrypto>=2.1,!=2.4
From what I can make out is pycrypto is the wrong version? Sorry have not done much with python.  I am looking at upgrading this version.

Thanks!


----------



## Novacha (Aug 31, 2013)

Run 


pip install pycrypto

and then rerun the


 fab make_deploy
command.


----------



## billingspc (Aug 31, 2013)

Thanks that did the trick.


----------



## Novacha (Aug 31, 2013)

WebSearchingPro said:


> Thanks for the reply
> 
> If youve ever used something like GFI RemoteManagement or Kaseya or Bomgar - all for Microsoft products. Its basically the same thing.
> 
> ...


I have created a basic API that you can put on a server. It is very lightweight and currently reports the following:


Memory status
Disk status
CPU status
The server's users
Network details (bytes sent, bytes received, packets sent, packets received, etc.)
Now I will look at implementing this into the server_listing project. It is currently secured by a secret key, so only people with the correct key are able to get any information about the server.

The source for this responder is at:

https://github.com/ServerListing/Responder


----------



## Novacha (Aug 31, 2013)

Development for the responder API has begun on the https://github.com/ServerListing/Server_Listing/tree/responder_api branch


----------



## WebSearchingPro (Aug 31, 2013)

Novacha said:


> Development for the responder API has begun on the https://github.com/ServerListing/Server_Listing/tree/responder_api branch


For some reason that links to this thread - Heres the real link:

https://github.com/ServerListing/Server_Listing/tree/responder_api

You work fast!


----------



## Novacha (Aug 31, 2013)

WebSearchingPro said:


> For some reason that links to this thread - Heres the real link:
> 
> https://github.com/ServerListing/Server_Listing/tree/responder_api
> 
> ...


Not quite sure why it is doing that weird linking. The feature should be ready in a few hours. I am just finishing off the ajax requests for the server view.


----------



## Novacha (Aug 31, 2013)

Just a quick update on where the update is at. All base features are now implement, with server network stats and users getting implementing next.

Here are a couple of screenshots of what it looks like right now:


----------



## Novacha (Aug 31, 2013)

*implemented

Can't edit after a certain amount of time.


----------



## ultimatehostings (Sep 1, 2013)

Great stuff I'm gonna try this sometime later today!


----------



## Shados (Sep 1, 2013)

I don't see a mention anywhere of a license - are you leaving it unlicensed...?


----------



## Novacha (Sep 1, 2013)

Shados said:


> I don't see a mention anywhere of a license - are you leaving it unlicensed...?


It is now licensed under the MIT license. Thanks for reminding me!


----------



## blergh (Sep 1, 2013)

snmp?


----------



## Novacha (Sep 1, 2013)

blergh said:


> snmp?


Nope


----------



## atho (Sep 9, 2013)

Any future updates for booting/reboot/shutdown and maybe user permissions associated with it? Also a "view only" mode that hides all update buttons and the manage links?

Otherwise it looks great. Very easy to install and configure and works like a champ.


----------



## Novacha (Sep 9, 2013)

atho said:


> Any future updates for booting/reboot/shutdown and maybe user permissions associated with it? Also a "view only" mode that hides all update buttons and the manage links?
> 
> 
> Otherwise it looks great. Very easy to install and configure and works like a champ.


Do you mean like a public view? Something like that wouldn't be too hard to do. Did you also want to have users that can only view certain servers?


For the reboot type of commands, they would only work through the SolusAPI, but I will see what I can do.


----------



## KVChosting (Sep 11, 2013)

It looks rather impressive.


----------



## HalfEatenPie (Dec 21, 2015)

Bringing this back up.


Any possible updates on this?  Or is anyone still using their installation?


----------

