Exceptionless is an awesome open source real-time error, feature, and log reporting solution that can be self-hosted for free (they provide a very reasonable pricing plans as well). Here’re some tips on self-hosting in the Windows environment.
Use these detailed instructions to set it up. Instructions are quite good. However, there are some details not mentioned in the guide which you could find helpful for self-hosting.
Elastic Search
When setting up Elastic Search, it’s a good idea to change the default location of the data folder. It can help avoid an accidental loss of your data when updating to the next version of Elastic Search. The data path can be set in the elasticsearch.yml – “path.data” property.
Rename your cluster name – “cluster.name” property. This can help prevent someone from accidentally joining your cluster.
To directly query Elastic Search, you can install Sense chrome plugin and run queries inside Chrome.
Another useful ES GUI plugin: elasticsearch-gui
To install, run cmd from ES installation bin folder: [~/elasticsearch] $ bin/plugin –install jettro/elasticsearch-gui
To access it, go to http://yourServer:9200/_plugin/gui/index.html#/dashboard (assuming default ES port 9200)
If you want to set up backups for ES, first set the repo location in elasticsearch.yml
path.repo: [“backupLocation”]
From Chrome, Sense plugin, run the following query to create a repo for your backups:
PUT /_snapshot/exceptionless_backup { "type": "fs", "settings": { "compress" : true, "location": "backupLocation" } }
When you want to create a snapshot, run:
PUT /_snapshot/exceptionless_backup/yourShapshotName?wait_for_completion=true
To delete an old snapshot:
DELETE _snapshot/exceptionless_backup/yourShapshotName
Removing Old Data
Exceptionless provides a job which will automatically remove data over a given retention period. But if you self-host, the retention period is indefinite. If you prefer to have Exceptionless remove the old automatically, you can modify the retention period directly in the Elastic Search. Run the following ES query to set retention period to 45 days:
POST /organizations-v1/organization/YourOrganizationId/_update '{ "doc" : { "doc" : { "_source": { "retention_days": 45 } } }
You can use Elasticsearch-gui plugin to figure out your organization Id.
Weirdness with IE 11.
For some reason IE 11 did not want to auto refresh itself. So, you could add these headers at IIS level:
Cache-Control:no-cache, no-store
Pragma:no-cache
This comes at the price of more hits to your server. But I couldn’t figure out the IE issue.
Redis
If you use Redis (recommended), this is how you specify the connection string:
<add name="RedisConnectionString" connectionString="serverName:6379" />
The important part is that there is no http in the server name