Jump to content

Server Console


GriefCode

Recommended Posts

Server Console

Simple Application to observe multiply servers and bigger infrastructures.
The application was basically written that I can keep track of all my servers, without having different pages for monitoring, backups and so on.

Features:

  • Frequent checks if a server is online/offline and also getting some information, such as:
    • CPU Usage 
    • CPU Load
    • RAM Usage (free/total/percentage)
    • DISK Usage (free/total/percentage)
    • Uptime
       
  • Block/Widget that users can see the status of the servers as well
  • Dedicated Front Page to observe the status
  • Maintenance mode for servers

 

As this is only an early development a lot things are planned:

  • Graphs displaying status/values over the time
  • More detailed stats
  • Dedicated status page
  • Notifications on downtimes / uptimes
  • Backup system

 

This applications requires the PHP-cURL extension!

This applications requires that this script is installed on any client server and is reachable by the forum server.

 

The whole application can be found open sourced on Github: https://github.com/Grief-Code/IPS-Server-Console

 

I'm already working on a minor update fixing some stuff:

  • Widget server selection was totally messed.
  • Add Server empty ips displayed a validation error

Update will be added later today.

The whole system is currently still in Beta, if you find any bugs please report them, I will commonly fix them within one day.

 

Greetings

Link to comment

Add These Features As It Progresses:

- More Widgets

- Better Stats (i mean like visual stats , numeric load looks good but what if there was a meter showing value is good, bad etc)

- Weekly reports by email 

- Convenience of setting into maintenance mode right from the page by adding a button next to status  (restricted to certain member groups such as "mayors" [mayors are like super moderators but are a separate member group]  in my case) ----> make this a higher priority than others since this is a big convenience and my mayors work under me, so they cant be administrators and access AdminCP besides they dont know how to use IPB 

- Ajax Refresh For Values(Refresh Values Through AJAX)

- Better Widget Presentation (No Offense But Current Widget Looks Boring and Unattractive If You See Through An Eye Of Customer (Non-Technical Person))

Link to comment

So I like the concept of this application, however, getting it to work properly on v4.1.18.2 does not work. I upload the tar file, set my servers up and nothing happens on the front page. The servers say that they were last updated 1969 or something to that nature. So I ventured into the tasks and noticed that the task for it has not run so when I run it comes with this error.

SELECT id, last_status_history FROM `serverconsole_servers` WHERE check_server=1 AND in_maintenance == 0
IPS\Db\Exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= 0' at line 1 (1064)
#0 /var/www/html/system/Db/Select.php(356): IPS\_Db->preparedQuery('/*IPS\\servercon...', Array, true)
#1 /var/www/html/system/Db/Select.php(418): IPS\Db\_Select->runQuery()
#2 /var/www/html/applications/serverconsole/tasks/checkservers.php(51): IPS\Db\_Select->rewind()
#3 /var/www/html/system/Task/Task.php(249): IPS\serverconsole\tasks\_checkservers->execute()
#4 /var/www/html/applications/core/modules/admin/settings/advanced.php(550): IPS\_Task->run()
#5 [internal function]: IPS\core\modules\admin\settings\_advanced->runTask()
#6 /var/www/html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /var/www/html/applications/core/modules/admin/settings/advanced.php(35): IPS\Dispatcher\_Controller->execute()
#8 /var/www/html/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\settings\_advanced->execute()
#9 /var/www/html/admin/index.php(14): IPS\_Dispatcher->run()
#10 {main}

Not sure what this all means so please help. 

Link to comment
6 minutes ago, shyest said:

So I like the concept of this application, however, getting it to work properly on v4.1.18.2 does not work. I upload the tar file, set my servers up and nothing happens on the front page. The servers say that they were last updated 1969 or something to that nature. So I ventured into the tasks and noticed that the task for it has not run so when I run it comes with this error.


SELECT id, last_status_history FROM `serverconsole_servers` WHERE check_server=1 AND in_maintenance == 0
IPS\Db\Exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '= 0' at line 1 (1064)
#0 /var/www/html/system/Db/Select.php(356): IPS\_Db->preparedQuery('/*IPS\\servercon...', Array, true)
#1 /var/www/html/system/Db/Select.php(418): IPS\Db\_Select->runQuery()
#2 /var/www/html/applications/serverconsole/tasks/checkservers.php(51): IPS\Db\_Select->rewind()
#3 /var/www/html/system/Task/Task.php(249): IPS\serverconsole\tasks\_checkservers->execute()
#4 /var/www/html/applications/core/modules/admin/settings/advanced.php(550): IPS\_Task->run()
#5 [internal function]: IPS\core\modules\admin\settings\_advanced->runTask()
#6 /var/www/html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /var/www/html/applications/core/modules/admin/settings/advanced.php(35): IPS\Dispatcher\_Controller->execute()
#8 /var/www/html/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\settings\_advanced->execute()
#9 /var/www/html/admin/index.php(14): IPS\_Dispatcher->run()
#10 {main}

Not sure what this all means so please 

Hey @shyest,

thanks for your feedback in first place. I think I have made a small mistake, there is a syntax error, I will shortly upgrade the application and notify you on that, then please try again and let me know if all is working.

Regards

Link to comment
Just now, GriefCode said:

Hey @shyest,

thanks for your feedback in first place. I think I have made a small mistake, there is a syntax failure which somehow seems to be allowed on mysql but not on mariadb, I will shortly upgrade the application and notify you on that, then please try again and let me know if all is working.

Regards

 

@GriefCode Thank you!

Link to comment

@GriefCode I am sorry to say that yes its different, however, I get this error now:

INSERT INTO `serverconsole_server_check_history` ( `serverconsole_servers_id`, `cpu_load_now`, `cpu_load_5min`, `cpu_load_15min`, `cpu_usage`, `ram_used`, `ram_total`, `ram_percentage`, `diskspace_free`, `diskspace_total`, `diskspace_percentage`, `uptime`, `status` ) VALUES ( 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'online' )
IPS\Db\Exception: Column 'cpu_load_now' cannot be null (1048)
#0 /var/www/html/system/Db/Db.php(808): IPS\_Db->preparedQuery('/*IPS\\servercon...', Array)
#1 /var/www/html/system/Patterns/ActiveRecord.php(458): IPS\_Db->insert('serverconsole_s...', Array)
#2 /var/www/html/applications/serverconsole/tasks/checkservers.php(97): IPS\Patterns\_ActiveRecord->save()
#3 /var/www/html/system/Task/Task.php(249): IPS\serverconsole\tasks\_checkservers->execute()
#4 /var/www/html/applications/core/modules/admin/settings/advanced.php(550): IPS\_Task->run()
#5 [internal function]: IPS\core\modules\admin\settings\_advanced->runTask()
#6 /var/www/html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /var/www/html/applications/core/modules/admin/settings/advanced.php(35): IPS\Dispatcher\_Controller->execute()
#8 /var/www/html/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\settings\_advanced->execute()
#9 /var/www/html/admin/index.php(14): IPS\_Dispatcher->run()
#10 {main}

 

Link to comment
Just now, Dorian Wawrzonkowski said:

Hey man. Is there any way you could do the serverCheck.php for Windows? I would greatly appreciate it.

As I've stated, it's not yet supported but I can try to create support for windows.
It will be included into the next update then.

Greetings

Link to comment
  • 3 weeks later...
  • 2 weeks later...

)), '', 'Test', 'all' )
IPS\Db\Exception: Field 'tolerance_counter' doesn't have a default value (1364)
#0 D:\ipboard\system\Db\Db.php(808): IPS\_Db->preparedQuery('/*IPS\\servercon...', Array)
#1 D:\ipboard\system\Patterns\ActiveRecord.php(460): IPS\_Db->insert('serverconsole_s...', Array)
#2 D:\ipboard\applications\serverconsole\modules\admin\general\servers.php(188): IPS\Patterns\_ActiveRecord->save()
#3 D:\ipboard\system\Dispatcher\Controller.php(86): IPS\serverconsole\modules\admin\general\_servers->perform()
#4 D:\ipboard\applications\serverconsole\modules\admin\general\servers.php(26): IPS\Dispatcher\_Controller->execute()
#5 D:\ipboard\system\Dispatcher\Dispatcher.php(129): IPS\serverconsole\modules\admin\general\_servers->execute()
#6 D:\ipboard\admin\index.php(14): IPS\_Dispatcher->run()
#7 {main}

I'm getting this error during setup a host.

 

This I have solved by removing STRICT_TRANS_TABLES from MySQL settings. 
We're running over ISS, I will take a look if I will able to get all working, it would be nice if this could be happen :D

Link to comment
On 2.4.2017 at 9:40 AM, DannyPhantom said:


)), '', 'Test', 'all' )
IPS\Db\Exception: Field 'tolerance_counter' doesn't have a default value (1364)
#0 D:\ipboard\system\Db\Db.php(808): IPS\_Db->preparedQuery('/*IPS\\servercon...', Array)
#1 D:\ipboard\system\Patterns\ActiveRecord.php(460): IPS\_Db->insert('serverconsole_s...', Array)
#2 D:\ipboard\applications\serverconsole\modules\admin\general\servers.php(188): IPS\Patterns\_ActiveRecord->save()
#3 D:\ipboard\system\Dispatcher\Controller.php(86): IPS\serverconsole\modules\admin\general\_servers->perform()
#4 D:\ipboard\applications\serverconsole\modules\admin\general\servers.php(26): IPS\Dispatcher\_Controller->execute()
#5 D:\ipboard\system\Dispatcher\Dispatcher.php(129): IPS\serverconsole\modules\admin\general\_servers->execute()
#6 D:\ipboard\admin\index.php(14): IPS\_Dispatcher->run()
#7 {main}

I'm getting this error during setup a host.

 

This I have solved by removing STRICT_TRANS_TABLES from MySQL settings. 
We're running over ISS, I will take a look if I will able to get all working, it would be nice if this could be happen :D

Interesting, I could simply add a default value over the column, wouldn't matter anyway.
Glad you found a solution for the issue. Sorry I wasn't around at that time.

Greetings

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...