You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.9 KiB

12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
  1. pyDash - v1.4.4 [![Follow @hostechs](https://dev.twitter.com/sites/default/files/images_documentation/bird_blue_32.png)](https://twitter.com/hostechs) [![View Profile](https://dlc1-s.licdn.com/sites/default/files/InBug-30px-R.png)](http://www.linkedin.com/in/hostechs/)
  2. ======
  3. [![Flattr this](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/2630601/k3onipydash-on-GitHub "Flattr this")
  4. A reusable django app for monitoring your linux server.
  5. Supported Python versions:
  6. - Python 2.x
  7. __[View Demo](http://pydash.hostechs.com/)__
  8. user: admin
  9. pass: admin
  10. ![pyDash](https://www.yaktab.com/en/2btxew)
  11. Installation
  12. ============
  13. Clone the repository to your pc and copy the pydash folder to your django application.
  14. Make sure that ``django.contrib.auth`` is installed and working.
  15. Open your project's ``settings.py`` and add ``pydash`` to ``INSTALLED_APPS``:
  16. INSTALLED_APPS = (
  17. 'pydash',
  18. )
  19. Open your project's ``urls.py`` and include the ``pydash`` urls.
  20. urlpatterns = patterns('',
  21. (r'^pydash/', include('pydash.urls')),
  22. )
  23. Make sure ``AppDirectoriesFinder`` is enabled in your ``STATICFILES_FINDERS``:
  24. STATICFILES_FINDERS = (
  25. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  26. )
  27. Before deploying to a live server, run the following command in order to collect the static files stored in pydash's directory:
  28. $ python manage.py collectstatic
  29. Settings
  30. ========
  31. There are 3 different refresh settings which are measured in `miliseconds`:
  32. TIME_JS_REFRESH = 30000 #30 seconds
  33. TIME_JS_REFRESH_LONG = 120000 #120 seconds
  34. TIME_JS_REFRESH_NET = 2000 #2 seconds
  35. If you wish to override the default settings, simply set those fields with the new values in your application's ``settings.py`` file.
  36. The refresh settings for each table are as follows:
  37. Memory Usage - TIME_JS_REFRESH
  38. Load Average - TIME_JS_REFRESH
  39. CPU Usage - TIME_JS_REFRESH
  40. Traffic Usage - TIME_JS_REFRESH_NET
  41. Disk Reads/Writes - TIME_JS_REFRESH_NET
  42. Uptime - TIME_JS_REFRESH_LONG
  43. Disk Usage - TIME_JS_REFRESH_LONG
  44. Online Users - TIME_JS_REFRESH_LONG
  45. Processes - TIME_JS_REFRESH_LONG
  46. Netstat - TIME_JS_REFRESH_LONG
  47. Remote data retrieval
  48. =====================
  49. pyDash allows you to retrieve data remotely.
  50. Data is returned in JSON and can be easily retrieved as long as the user agent has been authenticated by the web application. For more information about how sessions are managed in Django, please click [here](https://docs.djangoproject.com/en/1.6/topics/http/sessions/).
  51. pyDash has a list of short URLs which you can use to retrieve the specific data:
  52. /info/uptime/ - Uptime
  53. /info/platform/hostname/ - Hostname
  54. /info/platform/osname/ - OS Name
  55. /info/platform/kernel/ - Kernel
  56. /info/getcpus/cpucount/ - Number of CPU cores
  57. /info/getcpus/cputype/ - Type/Name of CPU
  58. /info/memory/ - Memory Usage
  59. /info/cpuusage/ - CPU Usage in percentage(%), free and used
  60. /info/getdisk/ - Disk Usage
  61. /info/getusers/ - Online Users
  62. /info/getips/ - IP Addresses
  63. /info/gettraffic/ - Internet Traffic
  64. /info/getdiskio/ - Disk Reads/Writes
  65. /info/proc/ - Running Processes
  66. /info/loadaverage/ - Load Average
  67. /info/getnetstat/ - Netstat
  68. To see the format of the JSON returned, you can access any of the URLs from your browser, e.g. `http://demo.pydash.net/info/uptime/` .
  69. OS Support
  70. ==========
  71. pyDash was tested and runs under the following OSes:
  72. - Centos
  73. - Fedora
  74. - Ubuntu
  75. - Debian
  76. - Raspbian
  77. - Pidora
  78. - Arch Linux
  79. It might work under others, but it hasn't been tested yet.
  80. License
  81. =======
  82. **[MIT](https://github.com/k3oni/pydash/blob/master/LICENSE.md)**
  83. Credits
  84. =======
  85. [Dashboard Template](http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/),
  86. [Bootstrap](http://getbootstrap.com/),
  87. [Font Awesome](http://fontawesome.io/)