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.

141 lines
4.0 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
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, assuming that ``pip`` is installed, run the
  14. following commands:
  15. * `` python setup.py sdist ``
  16. * `` pip install dist/django-pydash-app-*.tar.gz ``
  17. Make sure that ``django.contrib.auth`` is installed and working.
  18. Open your project's ``settings.py`` and add ``pydash`` to ``INSTALLED_APPS``:
  19. INSTALLED_APPS = (
  20. 'pydash',
  21. )
  22. Open your project's ``urls.py`` and include the ``pydash`` urls.
  23. urlpatterns = patterns('',
  24. (r'^pydash/', include('pydash.urls')),
  25. )
  26. Make sure ``AppDirectoriesFinder`` is enabled in your ``STATICFILES_FINDERS``:
  27. STATICFILES_FINDERS = (
  28. 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  29. )
  30. Before deploying to a live server, run the following command in order to collect the static files stored in pydash's directory:
  31. $ python manage.py collectstatic
  32. Settings
  33. ========
  34. There are 3 different refresh settings which are measured in `miliseconds`:
  35. TIME_JS_REFRESH = 30000 #30 seconds
  36. TIME_JS_REFRESH_LONG = 120000 #120 seconds
  37. TIME_JS_REFRESH_NET = 2000 #2 seconds
  38. If you wish to override the default settings, simply set those fields with the new values in your application's ``settings.py`` file.
  39. The refresh settings for each table are as follows:
  40. Memory Usage - TIME_JS_REFRESH
  41. Load Average - TIME_JS_REFRESH
  42. CPU Usage - TIME_JS_REFRESH
  43. Traffic Usage - TIME_JS_REFRESH_NET
  44. Disk Reads/Writes - TIME_JS_REFRESH_NET
  45. Uptime - TIME_JS_REFRESH_LONG
  46. Disk Usage - TIME_JS_REFRESH_LONG
  47. Online Users - TIME_JS_REFRESH_LONG
  48. Processes - TIME_JS_REFRESH_LONG
  49. Netstat - TIME_JS_REFRESH_LONG
  50. Remote data retrieval
  51. =====================
  52. pyDash allows you to retrieve data remotely.
  53. 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/).
  54. pyDash has a list of short URLs which you can use to retrieve the specific data:
  55. /info/uptime/ - Uptime
  56. /info/platform/hostname/ - Hostname
  57. /info/platform/osname/ - OS Name
  58. /info/platform/kernel/ - Kernel
  59. /info/getcpus/cpucount/ - Number of CPU cores
  60. /info/getcpus/cputype/ - Type/Name of CPU
  61. /info/memory/ - Memory Usage
  62. /info/cpuusage/ - CPU Usage in percentage(%), free and used
  63. /info/getdisk/ - Disk Usage
  64. /info/getusers/ - Online Users
  65. /info/getips/ - IP Addresses
  66. /info/gettraffic/ - Internet Traffic
  67. /info/getdiskio/ - Disk Reads/Writes
  68. /info/proc/ - Running Processes
  69. /info/loadaverage/ - Load Average
  70. /info/getnetstat/ - Netstat
  71. 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/` .
  72. OS Support
  73. ==========
  74. pyDash was tested and runs under the following OSes:
  75. - Centos
  76. - Fedora
  77. - Ubuntu
  78. - Debian
  79. - Raspbian
  80. - Pidora
  81. - Arch Linux
  82. It might work under others, but it hasn't been tested yet.
  83. License
  84. =======
  85. **[MIT](https://github.com/k3oni/pydash-django-app/blob/master/LICENSE.md)**
  86. Credits
  87. =======
  88. [Dashboard Template](http://www.egrappler.com/templatevamp-free-twitter-bootstrap-admin-template/),
  89. [Bootstrap](http://getbootstrap.com/),
  90. [Font Awesome](http://fontawesome.io/)