Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Getting Started

Chris Park edited this page Mar 21, 2018 · 32 revisions

Copy diskover-web settings in src/diskover/Constants.php.sample to src/diskover/Constants.php. Most important is setting the ES_HOST to the hostname or ip of your ES server unless it is running on the same host as diskover-web. The rest of the default settings should work fine unless you are using AWS Elasticsearch or are using a different port for Elasticsearch other than the default of 9200.

Change the default login username/password

Your login will expire after 60 min if no activity. You can also choose to disable logins.

<?php

namespace diskover;

class Constants {
    // set to your Elasticsearch host or ip
    const ES_HOST = 'localhost';
    // set to your Elasticsearch port, default 9200
    const ES_PORT = 9200;
    // set following two lines if using X-Pack http-auth
    const ES_USER = '';
    const ES_PASS = '';
    // login auth for diskover-web
    const LOGIN_REQUIRED = FALSE;
    const DISKOVER_USER = 'diskover';
    const DISKOVER_PASS = 'darkdata';
    // set to TRUE if using AWS ES
    const AWS = FALSE;
    // diskover.py socket listener
    const ENABLE_SOCKET_CLIENT = FALSE;
    const SOCKET_LISTENER_HOST = '127.0.0.1';
    const SOCKET_LISTENER_PORT = 9999;
    // default min file size (bytes) filter
    const FILTER = 1;
    // default mtime filter
    const MTIME = 0;
    // default maxdepth filter
    const MAXDEPTH = 2;
    // default don't use count (use size)
    const USE_COUNT = 0;
    // default show files on analytics pages
    const SHOW_FILES = 1;
    // default hide threshhold filter
    const HIDE_THRESH = 0.9;
    // default results per search page
    const SEARCH_RESULTS = 50;
}

Create index.php symlink.

$ cd public
$ ln -s dashboard.php index.php

Start diskover web using PHP's built-in web server.

$ cd public
$ php -S <IP>:8000

By default diskover web will communicate with the Elasticsearch API at http://<ES_HOST>:9200. If you are running ES on a different port than default 9200, you will need to change config file or pass this information to diskover web when starting it up via an environment variable:

$ APP_ES_PORT=<PORT> php -S <IP>:8000

You can also change the index(s) used this way:

$ APP_ES_INDEX=<INDEX> php -S <IP>:8000

APP_ES_INDEX2 for index2.

If no indices are set as args, you will have the option to pick your indices when you open the dashboard page. You can change your indices after on the Admin page, in the url variables (index and index2) or by removing diskover cookies.

Open your web browser and visit http://<IP>:8000. The default login is diskover / darkdata. Cookies are required.

Clone this wiki locally