This guide has been revised 06-03-2015. Start with a clean ubuntu 14.04LTS-x64 machine and get it updated
sudo su
apt-get update && apt-get dist-upgrade
reboot
| public class MvcApplication : HttpApplication | |
| { | |
| private static void initializeLogging() | |
| { | |
| var loggerConfiguration = new LoggerConfiguration() | |
| .Enrich.WithProperty("type", "application") | |
| .Enrich.WithProperty("application", "my-app-name") | |
| .Enrich.WithProperty("application_version", "1.2.3.4") | |
| .Enrich.WithProperty("environment", "development") | |
| .Enrich.With<Serilog.Extras.Web.Enrichers.HttpRequestIdEnricher>() |
| partial from http://blog.dimaj.net/content/howto-view-and-analyze-your-logs-web-page | |
| cd ~ | |
| wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz | |
| tar xzvf logstash-1.4.2.tar.gz | |
| sudo mv logstash-1.4.2 /opt/logstash | |
| sudo adduser --system --disabled-login --no-create-home --group logstash | |
| sudo usermod -a -G adm logstash | |
| #auto start script for logstash |
| #https://github.com/elasticsearch/curator/wiki/Installation | |
| apt-get install python-pip python-dev build-essential | |
| pip install elasticsearch-curator | |
| which curator | |
| # => /usr/local/bin/curator | |
| crontab -e | |
| # add this to run at 3:01AM cleanup of old indices older then 90 days |
| using System; | |
| using System.Text; | |
| using Nest; | |
| using NUnit.Framework; | |
| namespace ClassLibrary1 | |
| { | |
| public class MyObject | |
| { | |
| public MyEnum MyEnum { get; set; } |
| namespace Elasticsearch.Net.Connection | |
| { | |
| using System.Globalization; | |
| using System; | |
| using System.Text; | |
| /// <summary> | |
| /// HttpConnection with basic auth usage | |
| /// </summary> | |
| public sealed class BasicAuthHttpConnection : HttpConnection |
| using Nest; | |
| using System; | |
| using System.Globalization; | |
| namespace elasticsearch_nest_geoindex_demo | |
| { | |
| public class Location | |
| { | |
| public string Name { get; set; } |
| var settings = new ConnectionSettings("http://localhost:9200) | |
| .AddContractJsonConverters(type => | |
| { | |
| //TypeCheck to return StringEnumConverter for Enums and Nullable<T> where T : Enum | |
| if (type.IsEnum || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>) && type.GetGenericArguments().First().IsEnum)) | |
| return new Newtonsoft.Json.Converters.StringEnumConverter(); | |
| return null; | |
| }); |
| namespace Domain.TypeConverters | |
| { | |
| using System; | |
| using Newtonsoft.Json; | |
| /// <summary> | |
| /// Converter for converting Uri to String and vica versa | |
| /// </summary> | |
| /// <remarks> | |
| /// Code originated from http://stackoverflow.com/a/8087049/106909 |
| REM just a snippet | |
| msdeploy.exe | |
| -verb:sync | |
| -source:iisApp="%RootPath%mywebproject" | |
| -dest:package="%RootPath%Website.zip" | |
| -declareParamFile:"%RootPath%\parameters.xml" | |