Giter Club home page Giter Club logo

influx-capacitor's Introduction

influx-capacitor

Influx-capacitor collects metrics from windows machines using Performance Counters. Data is sent to influxDB to be viewable by grafana.

It is installed as a windows service named Influx-Capacitor. There is also a console application called Influx-Capacitor.Console that can be used for configuration, to check status and run commands manually.

Data is collected and sent to a InfluxDB database of your choice. Grafana is a great way of looking at the data.

Install using chocolatey https://chocolatey.org/packages/Influx-Capacitor

Visit the main site for more information http://influx-capacitor.com/

Performance Counters

By default configurations for a few Performance Counters are provided. Setup for counters are stored in xml-files in the same folder as the executables, or in the ProgramData folder (IE. C:\ProgramData\Thargelion\Influx-Capacitor) and are named with the file extension xml.

You can configure any Performance Counter available to be monitored. When you have added or changed a configuration file you need to restart the service for it to take effect. You can test and run manually using the console application.

Configuration

<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="[YourCounterGroupName]" SecondsInterval="[SecondsInterval]" RefreshInstanceInterval="[RefreshInstanceInterval]" CollectorEngineType="[CollectorEngineType]">
      <Counter>
        <MachineName>[MachineName]</MachineName>
        <CategoryName>[CategoryName]</CategoryName>
        <CounterName>[CounterName]</CounterName>
        <InstanceName Alias="[Alias]">[InstanceName]</InstanceName>
        <FieldName>[FieldName]</FieldName>
        <Limits Max="[Max]" />
      </Counter>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>
  • YourCounterGroupName - You own common name for the group of counters (This will be the table name in InfluxDB)
  • SecondsInterval - The interval in seconds that the group of counters will be collected.
  • RefreshInstanceInterval - An optional attribute for the interval used to refresh the list of instances for the counter. If set to 1, the counters are refreshed everytime. If set to 2, every other time and so on. To disable the refresh set this value to 0. The default value is 0, if the attribute is left out.
  • CollectorEngineType - Specifies the strategy of collecting data. Can be set to Safe or Exact, default is Safe. The Safe collector engine collects all counters and waits the specified SecondsInterval until the next read (SecondsInterval is actually seconds in between reads). Exact setting will read counter on the exact same time each interval. (SecondsInterval is actually seconds from start to next start read) Because of this the Exact setting will have to drop reads if the previous read takes too long to perform, since it then cannot start when it is supposed to.
  • MachineName - Optional element, used to specify the name of the machine where the counter should be read. If the element is left out or is empty, the current machine will be used.
  • CategoryName - Category name of the performance counter (Ex. Processor)
  • CounterName - Name of the counter (Ex. % Processor Time). Wild cards such as * and ? can be used heres. Using * will use all counters.
  • InstanceName - Name of the instance (Ex. _Total). Wild cards such as * and ? can be used heres. Use | to provide several names that could not be specified via wild-cards. For counters that does not have any instances, this element can be left out or left empty. Using * will give all instances. The instances are refreshed on every read so that new instances are added and obsolete ones removed.
  • Alias - This is an optional value that will be used as field name for the Instance specification. The value of this field will be the same as of the "instance" field.
  • FieldName - This optional value will be used to name the field value instead of the default "value" one. You can use this value to merge points together. Note that when you use this option, counter tags are ignored (only countergroup tags are used).
  • Max - This optional value will be used to fix the maximum value sent for this counter.

If you want to get the name of the counters right, simply open perfmon and find the counter that you want there. The names to put in the config files are exactly the same as the ones in perfmon.

Advanced: filters

When you start using instance names, there are cases where you can't get the correct name, for example because the instance name is dynamic and uses process id.

In such cases, you can use InstanceFilters at the CounterGroup level to apply some transformations on instance names, using regular expressions.

An example of configuration with filters.

<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="[YourCounterGroupName]" SecondsInterval="[SecondsInterval]" RefreshInstanceInterval="[RefreshInstanceInterval]" CollectorEngineType="[CollectorEngineType]">
      <Counter>
        <MachineName>[MachineName]</MachineName>
        <CategoryName>[CategoryName]</CategoryName>
        <CounterName>[CounterName]</CounterName>
        <InstanceName Alias="[Alias]">[InstanceName]</InstanceName>
        <FieldName>[FieldName]</FieldName>
        <Limits Max="[Max]" />
      </Counter>
      ...
      <InstanceFilters>
        <Filter Pattern="[Pattern]" />
        <Filter Pattern="[ReplacementPattern]" Replacement="[Replacement]" />
      </InstanceFilters>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>
  • Pattern - If you add a Filter element with only a Pattern attribute, then this pattern will be used as a filter to only include instances names matching this regular expression.
  • ReplacementPattern - If you add a Filter element with both a Pattern and a Replacement attribute, this regular expression pattern will be used to replace a part of the instance name.
  • Replacement - This expression will be used as a replacement for the pattern previously provided.

A filtering pattern will exclude counters where instance name does not match. A replacement filter will only change the name, without excluding any instance. All filters are executed sequentially on each instance name.

You can use the InstanceName element to choose counters for simple cases, then apply an advanced filter.

Here are some examples.

<InstanceFilters>
  <!-- this filter will only include counters names where ".NET" is present in the instance name -->
  <Filter Pattern="\.NET" />
  <!-- this filter will remove all pids from instance names for IIS apps. "1879_.NET v4.5" => ".NET v4.5" -->
  <Filter Pattern="^\d+_(.*)$" Replacement="$1" />
  <!-- this filter will replace ".NET v4.5" by "net45" -->
  <Filter Pattern="\.NET v4\.5" Replacement="net45" />
</InstanceFilters>

Advanced: custom providers

By default, Influx-Capacitor includes one standard provider, which is able to collect counters from system performance counters, as presented above.

A additional mechanism is included to allow external contributors to add their own providers. A provider is an assembly which references Tharga.Influx-Capacitor.Collector and expose a public class which implements Tharga.InfluxCapacitor.Collector.Interface.IPerformanceCounterProvider. Then, you can configure this custom provider in your configuration files, in a Provider element.

<Influx-Capacitor>
  <Providers>
    <Provider Name="[ProviderName]" Type="[ProviderType]" />
  </Provider>
</Influx-Capacitor>
  • ProviderName - A unique name for this provider. The same provider type can be registered multiple times with a different configuration. Each registration must use a different unique name.
  • ProviderType - The assembly qualified type name for this provider. eg: MyLibrary.MyCustomProvider, MyLibrary, version=1.0.0.0. If the provider is an internal provider (included in Tharga.Influx-Capacitor.Collector), you just have to provide the type name.

Specific provider settings can be included in configuration. See each provider documentation for details about these settings.

To use your specific providers, you have to indicate the provider uniquename in CounterGroup.

<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="..." Provider="[ProviderName]">
	  ...
	</CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

Application configuration

There are some application settings that can be configured. The configuration can be made in any xml-config file in the programdata folder. The default location of this configuration is application.xml.

  • FlushSecondsInterval - The interval that data is sent to the database. This is an optional value, default is 10 seconds.
  • Metadata - Metadata about Influx-Capacitor is sent to the measurement named Influx-Capacitor. This feature can be turned off by setting Metadata to false, by default this feature is on.
  • MaxQueueSize - The largest size allowed for the queue. If Influx-Capacitor is not able to send the queued data to the server, it will not keep collecting forever. The limit can be set to an optional value, default is 20000.
<Influx-Capacitor>
  <Application>
    <FlushSecondsInterval>10</FlushSecondsInterval>
    <Metadata>true</Metadata>
    <MaxQueueSize>20000</MaxQueueSize>
  </Application>
</Influx-Capacitor>

Database connection settings

The settings are typically stored in the file database.xml located in the ProgramData folder (IE. C:\ProgramData\Thargelion\Influx-Capacitor). The settings can be located in any other xml configuration file, but then you will not be able to manage the settings using the management console. You can change settings directly in the file and restert the service, or you can use the command "setup change" in the console application, and the service will be restarted for you. It is also possible to have multiple database targets. Add another Database element in the config file and restart the service. When using multiple targets the console application cannot be used to change the confguration.

There are several different types of databases supported. Each of them is configured differently. Set the type attribute in the Database element to select what database provider to use. The attributes Type defaults to InfluxDB, and Enabled is default true.

Supported types are

  • InfluxDB (default)
  • Kafka

InfluxDB

  • Url - The location of the InfluxDB server
  • Username - Login username
  • Password - password
  • Name - Name of the database
  • RequestTimeoutMs - Optional value, describing the HTTP request timeout when sending data to influxDB.
<Influx-Capacitor>
  <Database Type="InfluxDB" Enabled="true">
    <Url>http://localhost:8086</Url>
    <Username>MyUser</Username>
    <Password>qwerty</Password>
    <Name>InfluxDbName</Name>
	<RequestTimeoutMs>15000</RequestTimeoutMs>
  </Database>
</Influx-Capacitor>

Kafka

This is actually not a database, this type sends data to Kafka (http://kafka.apache.org/). The message is formatted for influxDB version 0.9.x.

  • Url - Url to the Kafka server. It is possible to provide a list of servers with ; as separator.
<Influx-Capacitor>
  <Database Type="Kafka">
	<Url>http://server1;http://server2</Url>
  </Database>
</Influx-Capacitor>

Null

This type is for development only. It collects points and sends them to no where.

<Influx-Capacitor>
  <Database Type="null" />
</Influx-Capacitor>

Acc

This type is for development only. It collects and accumulates points but never sends them anywhere.

<Influx-Capacitor>
  <Database Type="acc" />
</Influx-Capacitor>

Tags

You can add constant tags on a global, counter group and counter level. This can be done in any of the configuration files. The name of the tag has to be unique.

Global tags that will be added to all points sent to the database can be added like this.

<Influx-Capacitor>
  <Tag>
	<Name>[TagName]</Name>
	<Value>[TagValue]</Value>
  </Tag>
</Influx-Capacitor>

It is also possible to add a tags for a specific counter group, these tags can be added like this.

<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="[YourCounterGroupName]" SecondsInterval="[SecondsInterval]">
      <Counter>
        <CategoryName>[CategoryName]</CategoryName>
        <CounterName>[CounterName]</CounterName>
        <InstanceName>[InstanceName]</InstanceName>
      </Counter>
	  <Tag>
		<Name>[TagName]</Name>
		<Value>[TagValue]</Value>
	  </Tag>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

Tags for a specific counter is added like this.

<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="[YourCounterGroupName]" SecondsInterval="[SecondsInterval]">
      <Counter>
        <CategoryName>[CategoryName]</CategoryName>
        <CounterName>[CounterName]</CounterName>
        <InstanceName>[InstanceName]</InstanceName>
	    <Tag>
		  <Name>[TagName]</Name>
		  <Value>[TagValue]</Value>
	    </Tag>
      </Counter>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

Running the console application

The console version is named Tharga.Influx-Capacitor.Console.exe and provided together with the installation. The program can be started with command parameters, or you can type the commands you want in the program.

Config

  • List - Lists all available configuration files.
  • Auto - Will check if the connection works, if it does not then the user will be queried parameters needed for the setup. This command will start (or restart) the service if installed on the machine.
  • Change - This is the command to use if you want to change configuration settings. This command will start (or restart) the service if installed on the machine.
  • Show - Will show and test the connection. You will also get the version number of the influxDB database connected.
  • Database - Change what database is used but keep the same server.

Service

  • Status - Shows the status of the windows service.
  • Stop - Stops the windows service if it is running.
  • Start - Starts the windows service.
  • Restart - Restarts (or starts) the windows service.

Counter

  • List - Lists all performance counter configurations that exists.
  • Read - Reads the value from the performance counter to be displayed on screen.
  • Collect - Reads the value from the performance counter once and send it to the database.
  • Initiate - Initiates some default counters (If the files and counter group does not already exist).
  • Create - Create a new performance counter config file for a counter.

Versions

The currently supported versions of InfluxDB is from 0.9.x to 0.12.x.

Metadata

By default metadata is sent fron Influx-Capacitor to influxDB. (There is an Application that can turn this off if you do not want it) The data is register as measurement named Influx-Capacitor-Metadata.

Mainly the collecting of data and the status of the queue is what can be monitored. Use the counter tag in the where statement to select the metadata you want to analyze.

####Tags that appears for all metadata measurements

  • hostname - Name of the machine that collects the data
  • version - Version of Influx-Capacitor
  • counter - Name of the metadata counter (queueCount, readCount, readTime or configuration)
  • action - Action that triggered metadata measurement

queueCount

For measurements where counter = queueCount

Use this measurement to monitor the queue. How data is piled up and how it is sent to the server. If you have more than one server you are sending data to, you can see all servers metadata on all servers. This makes it easy to see if the queue is increasing because data cannot be sent to one of the servers.

####Tags

  • action - Triggered when one of the following actions occurred (Enqueue, Send)
  • targetServer - Url to the server where data is sent
  • targetDatabase - Name of the database where data is sent
  • failMessage - Error message when sending data. (Only messages that does not prevent metadata from beeing sent)

####Values

  • value - Total number of items in queue
  • queueCountChange - Number of items added or removed from the queue
  • sendTimeMs - The time in milliseconds it took to send data to the server

readCount

For measurements where counter = readCount

This one can be used to monitor the collection of data. Number of data and how long it takes.

####Tags

  • action - always the value collect
  • performanceCounterGroup - Name of the performace counter group
  • engineName - name of the engine collecting data (SafeCollectorEngine or ExactCollectorEngine)

####Values

  • value - Number of counters read
  • elapseOffsetTimeMs - If the ExactCollectorEngine is used, the offset time from when the read was supposed to happen.
  • totalTimeMs - Total time it took for all reader steps; synchronize, prepare, read, format, enque and cleanup.

readTime

For measurements where counter = readTime

The collecting of data involves several steps. Here you can monitor the time it takes for each step.

  • synchronize - When using the ExactCollectorEngine, Influx-Capacitor tries to read data at the exact same time. This value shows how long it takes to compensate for the actual time it takes to read the data.
  • prepare - Shows the time it takes to prepare the counters. The counters are refreshed using RefreshInstanceInterval, the time it takes will show up here.
  • read - This is the time it takes for the actual read of all counters. If there are many counters to read, this will take longer.
  • format - The time it takes to format the data that is to be sent to influxDB.
  • enque - This is the time it takes to put the data in the queue.
  • cleanup - The final step times the removal of obsolete counters. An example of this could be a counter for a SqlDatabase that has been removed or a process that does no longer exist.

####Tags

  • action - always the value collect
  • performanceCounterGroup - Name of the performace counter group
  • engineName - name of the engine collecting data (SafeCollectorEngine or ExactCollectorEngine)
  • step - Name of the step (with order number) for the data collector (Hint. Use this in graphana for grouping and stack the values)

####Values

  • value - Time in milliseconds for each step (Use the total sum to get the total time for the collector)

configuration

For measurements where counter = configuration

####Tags action - The action that performed the configuration test (config_auto, config_database, config_change)

####Values value - The value 1

Point format and measurements schema

By default, InfluxDB points are created with a "counter" and a "category" tag, and an unique field "value". You have the possibility to use alias for instances, and assign specific tag to each counter.

<CounterGroup Name="perfmon.memory" SecondsInterval="5">
    <Counter>
		<CategoryName>Memory</CategoryName>
		<CounterName>Available Bytes</CounterName>
    </Counter>
    <Counter>
		<CategoryName>Memory</CategoryName>
		<CounterName>Committed Bytes</CounterName>
    </Counter>
</CounterGroup>

Datas send with this configuration will result in this schema in InfluxDB:

> select * from perfmon.memory

time              category  counter          instance  hostname     value
20150203002300  Memory    Available Bytes  _Total    SERVER1   15766000
20150203002300  Memory    Committed Bytes  _Total    SERVER1     460000
20150203004300  Memory    Available Bytes  _Total    SERVER1   15966000
20150203004300  Memory    Committed Bytes  _Total    SERVER1     440000

This schema has the advantage of being very flexible and powerfull, but has the disavantage of consuming more memory (see official doc, when do I need more RAM) If you do not want to use counter's specific tags, or have simplier requirements, you can compact points and gain memory by using the FieldName config element:

<CounterGroup Name="perfmon.memory" SecondsInterval="5">
    <Counter>
		<CategoryName>Memory</CategoryName>
		<CounterName>Available Bytes</CounterName>
		<FieldName>free_bytes</FieldName>
    </Counter>
    <Counter>
		<CategoryName>Memory</CategoryName>
		<CounterName>Committed Bytes</CounterName>
		<FieldName>committed_bytes</FieldName>
    </Counter>
</CounterGroup>

Will give the following result in InfluxDB:

> select * from perfmon.memory

time              hostname  free_bytes  committed_bytes
2015020311002300  SERVER1     15766000           460000
2015020311004300  SERVER1     15966000           440000

This compact mode suffers from some limitations you have to be aware of:

  • You can not use wildcards for instances or counters, since the field name must be unique
  • You can not use counter tags, are they could conflict with other tags defined in other counters of the same group. Only counter group tags can be used.
  • The instance alias is ignored, since the instance tag is ignored. But you can still use instance specific counter: you have to add a counter element for each of them, with a different fieldname.
  • Schema is less self-descriptive, as you have to know which field name corresponds to which performance counter by yourself.

Nuget

There is a nuget package that contains the core fuctions. This package can be used within your C# code.

Besides the different targets included in Influx-Capacitor (InfluxDB and Kafka) there are some main features that can be useful.

Queue

Uning this feature you can place measurements on a queue to be sent as a batch. There is a resend feature that sends the measurements as soon as you get a connection to the server.

Managed functions (measure function)

You can place a measurement executor around your function that will measure how long a function take. It also listens to exceptions and send a 'Success' attribute to the database. This feature is implemented as a visitor pattern (execute around).

Simple void action

var measure = new Measure(new Queue(new InfluxDbSenderAgent(new InfluxDbAgent("http://localhost:8086", "MyDatabase", "root", "MyPassword"))));
measure.Execute(() =>
{
    //TODO: Do some stuff that you want to measure here.
    //Exceptions here will be captured, logged and re-thrown.
});

Also work with async functions

var measure = new Measure(new Queue(new InfluxDbSenderAgent(new InfluxDbAgent("http://localhost:8086", "MyDatabase", "root", "MyPassword"))));
var someResult = await measure.ExecuteAsync("MyMeasurement", () =>
{
    //TODO: Do some stuff that you want to measure here.
    //Exceptions here will be captured, logged and re-thrown.
    //The response will be logged.

    return Task.Run(() =>
    {
        return "Foo";
    });
});

Providing extra measurements

var measure = new Measure(new Queue(new InfluxDbSenderAgent(new InfluxDbAgent("http://localhost:8086", "MyDatabase", "root", "MyPassword"))));
measure.Execute((measurement) =>
{
    measurement.Tags.Add("A", 1);
});

influx-capacitor's People

Contributors

confusingboat avatar framiere avatar kirillkovalenko avatar nebour avatar poxet avatar tbolon avatar zeugfr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

influx-capacitor's Issues

config show - Unable to connect to database

Hello,

I'm very sorry to disturb, it should be something very simple, but I spent an hour with no success.
My config:

<?xml version="1.0" encoding="utf-8"?>
<Influx-Capacitor>
  <Database Type="InfluxDB" Enabled="true">
    <Url>http://influxdb_domain_name:8086</Url>
    <Username>capacitor</Username>
    <Password>capacitor</Password>
    <Name>my_db</Name>
    <RequestTimeoutMs>15000</RequestTimeoutMs>
  </Database>
</Influx-Capacitor>

when I try to test it in console with config show I always get:
Unable to connect to database
however I'm able to query influxdb with curl:

>Invoke-WebRequest http://influxdb_domain_name:8086/query?q='SHOW DATABASES'
StatusCode        : 200
StatusDescription : OK
Content           : {"results":[{"series":[{"name":"databases","columns":["name"],"values":[["general"],["my_db"]]}]}]}
RawContent        : HTTP/1.1 200 OK

I have:
Influx-capacitor 1.0.17, influxdb 0.9.6.1, windows 2012R2

Any advice would be greatly appreciated.

Send to Kafka (to simplify InfluxDB maintenance)

Hi,

I use Influx Capacitor for several monthes and I am very happy with it.
Thanks for this great piece of software !!!

Since our organization if growing, we got some problems with InfluxDB and have sometimes to put it offline for several minutes/hours for maintenance.
One of our engineers who is also working in ELK proposed us to implement Kafka (see http://kafka.apache.org/) to put it between our multiple Influx-Capacitors and our InlfuxDBs.
It mainly allows us to be able to "bufferize" perfmon data streams before they reach InfluxDB (and, when everything is working well, have the smallest possible delay to reach InfluxDB).
It is highly scalable and has very high throughput.

Do you think it is possible to implement a second backend type (to Kafka) in Influx-Capacitor ?
Our engineer said that it takes not that much time to write this extension on usual tools (we have others internal projects that we rewrote to ship to Kafka instead of directly to InfluxDB or Elastic).
I'am sorry I can't help because I am an op with to few knowledge in development ...

Format submitted could be a standard JSON. Only time and value should be float, others should be strings. For example :

 [{
                "measurement": "sys.cpu",
                "time": 1443085314552,
                "value": 10.0,
                "tags": {
                    "collector": "influx-capacitor",
                    "fqdn": "my-test-hostname",
                    "ecosystem": "myapp",
                    "role": "mssql",
                    "os": "Windows",
                    "osrelease": "2012R2",
                    "unit": "percent",
                    "category1": "user",
                     "core": "0"
                }
},
{
                "measurement": "sys.cpu",
                "time": 1443085314552,
                "value": 15.43,
                "tags": {
                    "collector": "influx-capacitor",
                    "fqdn": "my-test-hostname",
                    "ecosystem": "myapp",
                    "role": "mssql",
                    "os": "Windows",
                    "osrelease": "2012R2",
                    "unit": " percent ",
                    "category1": "idle",
                     "core": "1"
                }
}]

Tell me what you think of that idea !
Thanks.

Ability to define http request timeout to send data

According to #47, nowadays is not possible to define the timeout of http request sent to influxdb.

Looking at MSDN documentation, the default value of the timeout property is 100 seconds (100.000 miliseconds) and I think this very high. If influxdb is slow to respond, probably the queue will increase fast (I don't know what behavior of capacitor about retries when sending collected data results in error, reenquee?).

Have control of timeout property should help a lot.

Documentation:
https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.timeout(v=vs.100).aspx

Add tags at counter level and allow instance tag have another name

After discussions with collegues, they argued that possibility to create many tags on InfluxDB can be an advantage to make some global queries more simple and get most advantage of InfluxDB features.
For example, creating "perfmon.processor.pct_user", "perfmon.processor.pct_system" and "perfmon.processor.pct_irq" will quickly force us to make many queries and merge the results.

Using only the field names of perfmon (countercategory, countername, instance) is too a little restrictive.

It should be better to have someting more generic for measure names, like "perfmon.processor", "perfmon.disk".
And then using tags to add deeper view (like "consumer" in ['user','system','irq', ...] for cpu, or "pattern" in ['read','write'], ...).
And we could also add some other tags like "unit" ['pct','seconds','megabyte_per_sec','io_per_second'...].

That would make querying easier and more human readable.

That is, somewhere, a way to "translate" the perfmon hierarchy.
For that point, it would be also useful to be able to "copy" the "instance" tag values under another tag name (defined at counter level), because sometime we can't just make asumptions on some counter instance, like different disk names, number of cores, network card name, etc. ...

Not sure I am very clear, an example of possible implementation in config files would help you to understand:

<CounterGroups>
    <CounterGroup Name="system.cpu" SecondsInterval="5">
        <Counter>
            <CategoryName>Processor</CategoryName>
            <CounterName>% Processor Time</CounterName>
            <InstanceName>*</InstanceName>
            <CounterTag>
                <Name>measure</Name>
                <Value>usage</Value>
            </CounterTag>
            <CounterTag>
                <Name>unit</Name>
                <Value>pct</Value>
            </CounterTag>
            <InstanceTagAlias>
                <Name>core</Name>
            </InstanceTagAlias>
      </Counter>
    </CounterGroup>
</CounterGroups>
etc. ...

We would obtain something like:

_select * from system.cpu_
time                   measure       unit    core    value   (...)
2016-01-01T01:01:01Z   "usage"       "pct"   "0"     12.564  (...)
2016-01-01T01:01:01Z   "usage"       "pct"   "1"      9.947  (...)
2016-01-01T01:01:01Z   "usage"       "pct"   "2"     28.197  (...)
2016-01-01T01:01:01Z   "usage"       "pct"   "3"     82.073  (...)
2016-01-01T01:01:01Z   "frequency"   "mhz"   "0"     3600    (...)
2016-01-01T01:01:01Z   "frequency"   "mhz"   "1"     3000    (...)
2016-01-01T01:01:01Z   "frequency"   "mhz"   "2"     3000    (...)
2016-01-01T01:01:01Z   "frequency"   "mhz"   "3"     3000    (...)
etc. ...

I know it is a big change from the actual approach (which is closer to perfmon view). In fact, in our usage, other system (linuxes, firewalls, apps), will be collected by different tools and we want to get a global approach that make both global analysis and develoment of grafana dashboards easy.

I think this kind of naming convention (all-tagged approach with flexibility at counter level) is more mature and makes sense.

Let me know what you think about that !

Add a way to send multiple values in one point

I was planning to use Capacitor to send perfmon counters to influxdb, but after some tests I wanted to change the point schema to allow a more compact schema.

Actually, when datas are sent to InfluxDB, the schema follows a convention where two tags "category" and "counter" are used with a single value:

time            category  counter          instance  hostname     value
20150203002300  Memory    Available Bytes  _Total    SERVER1   15766000
20150203002300  Memory    Committed Bytes  _Total    SERVER1     460000
20150203004300  Memory    Available Bytes  _Total    SERVER1   15966000
20150203004300  Memory    Committed Bytes  _Total    SERVER1     440000

In my opinion, this schema a some pro:

  • better discoverability
  • easy to use

But also some cons:

  • higher memory footprint (more tags)
  • values is more apples and oranges (could be percents and values in the same field)

So, my suggestion is to find a way to use a more compact schema, similar to the schema sent by tools such as telegraph:

time            hostname  free_bytes  committed_bytes
20150203002300  SERVER1     15766000           460000
20150203004300  SERVER1     15966000           440000

In this case, we have now one single point with all values (and no tags). It will certainly have some limitations.

I have a PR ready to enhance the configuration and the behavior of the program to allow sending this kind of schema. It is an opt-in option, where the modified code will only be triggered when this option is used. I am really new to this project (only have used it in tests so far), so I hope I could help you anyway. Comments are welcome :)

Regards,

Remote machine(s) monitoring

A nice feature to have would be possibility to read counters not only from localhost but from different machine(s).

Cannot read counters

Hello,

First, I would like to thank you for this project, it is exactly what I need to monitor machines (locally or remotely)!

Now my issue: I finally managed to configure InfluxDB access, and this works ('config show' generates a successful 'ping' to InfluxDB).
However, I cannot configure counters, even standard ones.
I created two XML files for metrics:

<?xml version="1.0" encoding="utf-16"?>
<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="processor" SecondsInterval="10">
      <Counter>
        <CategoryName>Processor</CategoryName>
        <CounterName>% Processor Time</CounterName>
        <InstanceName>*</InstanceName>
      </Counter>
      <Counter>
        <CategoryName>Processeur</CategoryName>
        <CounterName>% temps processeur</CounterName>
        <InstanceName>*</InstanceName>
      </Counter>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

and

<?xml version="1.0" encoding="utf-16"?>
<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="processor2" SecondsInterval="5" RefreshInstanceInterval="0">
      <Counter>
        <CategoryName>Processor</CategoryName>
        <CounterName>% Processor Time</CounterName>
        <InstanceName>_Total</InstanceName>
      </Counter>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

Please note that my Win7 SP1 is installed in French, so I tried both English and French names for perf counters.
I activated service log file and got these lines:

WARN - 24/04/2016 22:20:02: Unable to get performance counter .Processor.% Processor Time.*. La catรฉgorie n'existe pas.
WARN - 24/04/2016 22:20:02: Unable to get performance counter .Processeur.% temps processeur.*. La catรฉgorie n'existe pas.
ERROR - 24/04/2016 22:20:02: Engine processor: La rรฉfรฉrence d'objet n'est pas dรฉfinie ร  une instance d'un objet.
WARN - 24/04/2016 22:20:02: Unable to get performance counter .Processor.% Processor Time._Total. La catรฉgorie n'existe pas.
ERROR - 24/04/2016 22:20:02: Engine processor2: La rรฉfรฉrence d'objet n'est pas dรฉfinie ร  une instance d'un objet.
INFO - 24/04/2016 22:20:02: Service Influx-Capacitor version 1.0.18.0 started.
ERROR - 24/04/2016 22:20:07: Engine processor2: La rรฉfรฉrence d'objet n'est pas dรฉfinie ร  une instance d'un objet.
ERROR - 24/04/2016 22:20:12: Engine processor: La rรฉfรฉrence d'objet n'est pas dรฉfinie ร  une instance d'un objet.
ERROR - 24/04/2016 22:20:12: Engine processor2: La rรฉfรฉrence d'objet n'est pas dรฉfinie ร  une instance d'un objet.

In English it says that the category does not exist, which is rather annoying for Processor (English) or Processeur (French). Note that perfmon find these categories with no problem.
Finally I tried to create the counter directly in console (see attached PNG file).
console_counter
I enter category 'Processor' -> OK
I enter counter '% Processor Time' -> NOK ('There are several matches to the entry')
If I enter counter '% Processor Time' -> OK, but counter not found!

Thanx for your help!
Stรฉphane.

Does MachineName accept IP Address??

I am trying to monitor remote machine. I am passing IP Address as the MachineName in my configuration file. But it does not seem to collect the counters from the remote machine. Also, I am not joined to domain. Do the machine need to be on same domain??

Tag values always are double quoted enclosed

When I look at data, tag values text includes double quotes at beginning and ending :

show TAG VALUES from processor WITH KEY=hostname

returns something like:

"MyHost1"
"MyHost2"

And for query select * from processor limit 1:

time    category    counter hostname    instance    value
2015-09-04T07:54:06Z    ""Processor""   ""% Processor Time""    ""MyHost1"" ""0""   7.587343

That forces me to make all my queries with text tags enclosed by double quotes and simple quotes :

select * from processor where hostname='"MyHost1"'

Is it normal ?

Thanks.

PS: This application is great, exactly what i was searching for monthes ๐Ÿ‘

Stop collecting after midnight

For some reason, all our servers stopped sending datas to influxdb after midnight yesterday.
I was able to reproduce the problem using server console:

InfluxDb API responded with status code=BadRequest, response={"error":"write fai
led: field type conflict: input field \"queueCountChange\" on measurement \"Infl
ux-Capacitor-Metadata\" is type float64, already exists as type integer"}

For now I am looging at the code to see if I find the culprit.

The installed version was 1.0.15.

Allow mutivalued InstanceName property for a Counter

Use case: I'm trying to peek various memory related counters for all the Microsoft Exchange processes. The ability to use wild-cards helps a lot, e.g. I use <InstanceName>*Exchange*</InstanceName> to grab all the processes that have Exchange in their names. But this does not cover all the exchange processes, because there is store, msftefd, msftesql, etc. For each of those, apparently I'll have to copy / paste the same Counter section. Instead, it would be nice to use several InstanceName sections within a single Counter section.

Performance counter not working

Hi,

I am trying to set the Influx Capacitor to work with Exchange Server 2013 (Windows Server 2012 R2).
However I got an issue with performance counter (MSExchange Database ==> Instances and Counter name = I/O Database Reads (Attached) Average Latency).
When I start the service, it shows the errors below.
1- Engine MSExchange Database ==> Instances: Object reference not set to an instance of an object.
2- Unable to get performance counter MSExchange Database ==> Instances.I/O Database Reads (Attached) Average Latency.. Category does not exist.

I tried to use the escape characters ( >) but did not work.

All others performance counters worked well, only this one is not working.

Do you have any work around for this?

Tks

1.0.4 version problem with influx 0.9x

Data do gets sent to influx 0.9v but:
the tags have "" around them making them not usable?
"show tag keys from Processor" returns nothing, also the time column is not epoch meaning its corrupt?
tried with grafana and cant graph anything :/

Ability to track arbitrary things as counters

I have an internal requirement that could be adressed: we are using azure sql database, and performance counters for the database are only available through the sys.dm_od_performance_counters view.

My idea is to add an abstraction around performance counters to allow arbitrary providers to provide counters values.

It is similar to issues #28 and #46, but I do not want (for now) to expose them as performance counters for the system. It seems to be a lot easier to just provide IPerformanceCounterInfos instead of registering in the system new performance counters (it requires some admin rights and configuration to works).

This work will requires some steps:

  • Create a new abstraction around the code which transform an ICounterGroup into IPerformanceCounterInfo
  • Extract from CounterBusiness all works related to system performance counters in a new PerformanceCounterProvider. For simplicity, hard-code usage of thie provider into CounterBusiness
  • Add a way to select the provider in xml configuration
  • Provide provider's specific settings in xml.
  • Create a new SqlDmvPerformanceCounterProvider which will create IPerformanceCounterInfo based on an sql server statement

I will track this work in my own "abstract-perfcounterbusiness" branch for now.

I will try to fix the issues #28 and #46 with this work. The plugin feature could requires some big changes in the code (copy/paste plugin assemblies, dynamic registration, dependency injection, etc.)

Influx-Capacitor service self monitoring

In my monitoring system, normally I check the state of a service to ensure that is running.
When monitor influx-capacitor service, even its running we have no guarantees that it is collecting data. For example, if connection to database is unavailable:

Log Name: Application
Source: Tharga.Toolkit.Console
Date: 26/02/2016 10:06:30
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ComputerName
Description:
Could not establish a connection to the database.

We could have an option to configure an URL where the service will send current state at specific times, and possible error messages like database unavailable. It would work as a heartbeat monitoring.

Something like this:


<Influx-Capacitor>
  <HealthCheck Type="Nagios|OpsMgr|Custom" Enabled="true" SecondsInterval="60" SendErrorMessages="true">
    <MachineName>MyComputer</MachineName>
    <Url>http://mymonitor.com/AgentStatus</Url>
  </HealthCheck>
<Influx-Capacitor>

Add the ability to rename/filter instances

Before using InfluxDB I was using graphite, and a powershell script to send data to graphite.

One of the useful feature this tool has was the ability to rename and filter counters based on regular expressions.

See an example in StatsToGraphite.xml, in elements <MetricsCleaning> and <Filtering>

I am facing a problem that requires the kind of same functionality on capacitor.

The problem arise when collecting IIS and ASP.NET counters, in categories W3SVC_W3WP and WAS_W3WP: the instance name is composed of the pid and the application pool name (see this doc).
So instances names varies when processes are started/recycled. So, it is impossible to filter by instance name, and we can not send this instance name as a tag, because the value will change too often.

Basically two features are needed:

  • the ability to filter instances based on a regular expression (better than the actual wildcard)
  • the ability to rename instances to remove the varying part (the pid)

My idea for now is:

Add a new <InstanceFilters> element under <CounterGroup>. Within this element, you can add multiple <Filter> element.
Each <Filter> must define a Pattern attribute with a regular expression, and an optional Replacement pattern.

During counter reading, each filter is applied to the instances returned by the performance counter.

  • If the filter only defines the Pattern property, then the instance name is matched against it. If it matches, then the function returns the instance name unchanged. If it doesn't it returns null.
  • If the filter defines both Pattern and Replacement, then the replacement is executed and the result is returned.
  • Each filter is executing, using the instance name returned from the previous, until all have been applied or until a filter returns a null value.)

If an instance name is null after the filters pass, the counter is ignored. Otherwise, the value is read and the process continue.
The new instance name is used when sending the value to the collector.

Configuration example:

<InstanceFilters>
  <!-- this filter will exclude all instance names where ".NET" is not present in the instance name -->
  <Filter Pattern="\.NET" />
  <!-- this filter will remove all pids from instance names for IIS apps. "1879_.NET v4.5" => ".NET v4.5" -->
  <Filter Pattern="^\d+_(.*)$" Replacement="$1" />
  <!-- this filter will replace ".NET v4.5" by "net45" -->
  <Filter Pattern="\.NET v4\.5" Replacement="net45" />
</InstanceFilters>

Possible enhancements:

  • possibility to share filter groups with other counter groups
  • possibility to define filter to specific counters
  • possibility to simplify the pattern when we want to match a simple string (remove the necessary \ before dots)

Do you think this feature could fit the project ? I have some prototype already, but I prefer to be sure that I am not missing anything or that I am going in the right direction.

Stops sending data when instance disappers?

It appears that IC stops sending data when a counter instance momentarily disappeas, such as when a service is restarted.

I'm seeing this with IIS counters - if IIS is restarted, IC must also be restarted or no data shows up.

Service stops to send collected data

Hi,

I'm facing some issues with agent, where sometimes, the collector service is up but no data is sent to influxdb. I've installed the agent in a lot of servers, and many of then has the same behavior.
Restarting service fix the issue, but it happens again after no specific time.

Have you ever faced this behavior?

There's an option to enable trace or detailed log to help understand what is happening?

Regards,

Does not work with 0.10

I've just updated my back-end server to InfluxDB 0.10.0 and the capacitor service is now unable to send the data there. I guess, the problem is that the service uses InfluxVersion.Auto when creating a database connection object instance.

It seems that you use your own version of InfluxDB.NET.dll, because the original one does not have InfluxVersion enumeration at all, however I could not find the source code of your fork. I suppose it's the InfluxDB.NET.dll code that needs to be fixed for 0.10.

Please fix and provide a link the source code.

Centralized configuration management

It is a bit messy to keep track of all servers and how Influx-Capacitor is configured on them.

nathanwebb suggested a way of configuring them from one central point.

My idea here would be a simple service exposing a WebAPI that Influx-Capacitor can talk to. What you need to do then is just pointing Influx-Capacitor to the http address and the configurations will be read from there.

Cant type db url in console

Hi! I try setup server from console .\Tharga.Influx-Capacitor.Console.exe server config but i simply cant type : . When paste url from buffer it appears trimmed. http://localhost become http//localhost

Microsoft Windows Server 2012 R2 Standard

P.S. Can you provide example of server config? I will create it manually ;)

Memory leak in Tharga.Influx-Capacitor.Service Processor

Hi,

Firstly, this is a great tool. It didn't take very long to hook up, and is pretty much exactly what I was looking for.
Installed it couple of days ago, with assistance with the database.xml file, and started to see stats immediately. Which is great, because I can see a memory leak in the Tharga.Influx-Capacitor.Service. Here are a couple of charts to show what I mean:

Firstly the working set - 1.4GB in 24 hours.

workingset

As a result, page fault have gone through the roof in the last few hours:

pagefaults

I'm going to restart the service, but if you need any logs, or whatever else, please let me know.

Cheers,
Nathan

Types of allowed databases

Hello,

looking at the source code, in the ConfigBusiness class, has no swtich option to influxdb (actually is empty). That will be default behavior or is a typo error?

namespace Tharga.InfluxCapacitor.Collector.Business
{
private static IEnumerable GetDatabaseConfig(XmlDocument document)
{
var databases = document.GetElementsByTagName("Database");
foreach (XmlNode database in databases)
{
var databaseType = GetDatabaseType(database);
switch (databaseType)
{
case "null":
yield return GetNullDatabaseConfig(database);
break;
case "acc":
yield return GetAccDatabaseConfig(database);
break;
case "kafka":
yield return GetKafkaDatabaseConfig(database);
break;
case "":
yield return GetInfluxDatabaseConfig(database);
break;

default:
throw new ArgumentOutOfRangeException(string.Format("There is no database type with name {0}.", databaseType));
}
}
}
}

System configuration details

Hi,

It would be really handy to get the current system configuration, such as Total installed RAM. Unfortunately perfmon doesn't provide these counters. Without this, it's pretty hard to figure out current memory utilisation.

I don't know anything about C#, but found this MSDN guide:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa366589%28v=vs.85%29.aspx

Other details that help with capacity planning are number and type of CPUs, number and size of disks, number of network interfaces, etc...

Machine metrics

Make it possible to monitor the following... (As suggested by nathanwebb)

  • Total installed ram
  • CPUs
  • disks
  • network interfaces
    (Data as count, type and other)

My idea is to expose the metrics as a performance counter that can be monitored by perfmon and used as any other counter by Influx-Capacitor.

Ability to call plugins

It's a very common situation where is required collect details about the server and not only performance counters. For example:

  • how many websites exists in IIS
  • amount of used and free space on each physical disks.
  • installed applications
    I think if the service allows the usage of plugins and execute wmi queries would be good.
    Probably, this is related to #28

Batch send counters to influx

Do not send the counters one-by-one. Group them together and send data to the server.

Make the send interval configurable.

Feature Request: support pulling metrics from CIM/WMI

I have an HP server and I installed the "HPE Insight Management WBEM Providers for Windows Server x64 Editions", which gives all sorts of fun things such as HP_NumericSensor (temp reading) and HP_PowerMeter. Naturally, I'd love to ship these metrics to InfluxDB to make pretty graphs.

Unfortunately, CIM stuff doesn't seem to be supported.

Service fails to send data just after startup then never succeeds

I have a strange bug on several setups that has big impact as I try to generalize Influx-Capacitor in my servers and I get many failures.

It seems to occur more frequently with many counters and high collect rates (in my situation : about 800 counters collected every 10 seconds and refreshed every 30 collects, sent to DB every 20 second).
In these situations, errors like "engine my.custom.metrics": Dropping x keys. appear in the event log.
Then no metrics go to InfluxDB and the process takes more and more memory, and does not respond to stop service requests.
It seems that putting lower collect or db-send refresh rates or db refresh rate makes this thing happen a few times less (at the beginning my setup was 5 sec collect and feed to DB).

The behaviour is also reproductible from console with "counter collect" command.

Perhaps it has something to do with first connexion to InfluxDB ?
Our environments feeds to 2 InfluxDB but I also had the problem with only 1 InfluxDB.

Instance wildcard request

Make it possible to get specific instances through wildcard expression :

Process (sql*) \ % processor time
Would collect for all processes beginning with sql etc

Check out collectw on github which does that by regex.

Metadata Counter

Send metadata about the performance of the influx-capacitor to influxDB as a separate counter.

Record the time it takes to read counters, information about the queue and by how much the Exact counter is adjusted to be in sync.

This feature should be optional and configurable.

Adding ability to define custom static tags (in configuration)

It would be nice to add in the configuration (globally or at counter level) the ability to add custom tags (with static key+value) that would be added to all metrics sent to Influx.

For example, on all servers I would like to get a tag called "Project" and, on each machine, I would put the name of the related project.
That would allow me to query easily all performance counters of all machines for a specified project:

select min(value) 
from disk 
where time > now() - 1h 
and category='"LogicalDisk"' and counter='"% Idle Time"' 
and project='Gamma'
group by hostname,instance

Thanks !

Adding ability to refresh counter every x minutes/hours

Hi,

I would like to propose a little enhancement : is it possible to add an auto-refresh of all counters (like when I do a "counter list" in the console) in a regular time basis (every x minutes or hours) ?
I have for example counters on SQL Server on databases (counter instance = *), so each time I create a new db, I have to refresh the counters to get the new db metrics.

Thanks for your great work !

Application stops collecting data when counter is changed

Hello guys!

I'm facing some issues mentioned on #64 #59 and #47 but i'm not sure that occurs by the same reasons.
The servers reporting to InfluxDB constantly stops to send data and I can't figure it out why.

At first instance, I've though that this issue was related with some dynamic counters, like the example bellow (this is the entire configuration but the point is the counter Current Connections):

<?xml version="1.0" encoding="utf-8"?>
<Influx-Capacitor>
  <CounterGroups>
    <CounterGroup Name="web-server" SecondsInterval="60" RefreshInstanceInterval="300">
      <Counter>
        <CategoryName>Active Server Pages</CategoryName>
        <CounterName>Requests Queued</CounterName>
        <InstanceName></InstanceName>
    <FieldName>asp_requests_queued</FieldName>
        <Tag>
          <Name>requests_queue</Name>
          <Value>asp_classic</Value>
        </Tag>
      </Counter>
      <Counter>
        <CategoryName>Active Server Pages</CategoryName>
        <CounterName>Requests/Sec</CounterName>
        <InstanceName></InstanceName>
    <FieldName>asp_requests_sec</FieldName>
        <Tag>
          <Name>requests_per_sec</Name>
          <Value>asp_classic</Value>
        </Tag>
      </Counter>
      <Counter>
        <CategoryName>ASP.NET</CategoryName>
        <CounterName>Requests Current</CounterName>
        <InstanceName></InstanceName>        
    <FieldName>asp_current_requests</FieldName>
      </Counter>
      <Counter>
        <CategoryName>ASP.NET</CategoryName>
        <CounterName>Requests Queued</CounterName>
        <InstanceName></InstanceName>
    <FieldName>aspnet_requests_queued</FieldName>
        <Tag>
          <Name>requests_queue</Name>
          <Value>asp_net</Value>
        </Tag>
      </Counter>
      <Counter>
        <CategoryName>APP_POOL_WAS</CategoryName>
        <CounterName>Current Worker Processes</CounterName>
        <InstanceName>_Total</InstanceName>
    <FieldName>current_worker_processes</FieldName>
        <Tag>
          <Name>web-server-usage</Name>
          <Value>worker-processes-running</Value>
        </Tag>
      </Counter>
      <Counter>
        <CategoryName>W3SVC_W3WP</CategoryName>
        <CounterName>Active Requests</CounterName>
        <InstanceName>_Total</InstanceName>
    <FieldName>active_requests</FieldName>
        <Tag>
          <Name>web-server-usage</Name>
          <Value>active-requests</Value>
        </Tag>
      </Counter>
      <Counter>
        <CategoryName>Web Service</CategoryName>
        <CounterName>Current Connections</CounterName>
        <InstanceName>*</InstanceName>
    <FieldName>current_connections</FieldName>
      </Counter>
    </CounterGroup>
  </CounterGroups>
</Influx-Capacitor>

This configuration brings me counters for every website installed on a server but, because this server got new websites installed and other websites are deleted every time, new counters will always appears or fade away, causing error Engine web-server: Object reference not set to an instance of an object. (#59). Apparently this error was solved after add an value to RefreshInstanceInterval, but the problem of servers stopping send data wasn't.

Right now, I'm stucked with some servers that stopped to send data to the endpoint on a few hours ago but, the last log was wrote about two days ago. The error generated it's available bellow (no logs were generated in same time the Influx-Capacitor stops sent data):

ERROR - Log entry string is too long. A string written to the event log cannot exceed 32766 characters.
System.ArgumentException: Log entry string is too long. A string written to the event log cannot exceed 32766 characters.
   at System.Diagnostics.EventLogInternal.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
   at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at System.Diagnostics.EventLog.WriteEntry(String source, String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
   at Tharga.Toolkit.Console.Command.Base.ServerConsole.WriteLineEx(String value, OutputLevel level)
   at Tharga.Toolkit.Console.Command.Base.SystemConsoleBase.WriteLine(String value, OutputLevel level, Nullable`1 consoleColor)
   at Tharga.InfluxCapacitor.Service.WindowsService.SendBusinessEvent(Object sender, SendCompleteEventArgs e)
   at Tharga.InfluxCapacitor.Collector.Business.SendBusiness.OnSendBusinessEvent(Object sender, SendCompleteEventArgs e)
   at Tharga.Influx_Capacitor.Sender.InfluxDataSender.OnSendBusinessEvent(SendCompleteEventArgs e)
   at Tharga.Influx_Capacitor.Sender.InfluxDataSender.Send()
   at Tharga.InfluxCapacitor.Collector.Business.SendBusiness.Elapsed(Object sender, ElapsedEventArgs e)
ERROR - One or more errors occurred.
. . . 
A LOT OF DATA 
. . .
ERROR - 22/05/2016 06:53:06: An error occurred while sending the request.
WARN - 22/05/2016 06:53:06: Putting 634 points back in the queue.

No other logs are available on Event Viewer or in the log file. The queue is empty. The only other information logged was this one (which doesn't match with the time where server stops sending data):

ERROR - 21/05/2016 06:18:09: InfluxDb API responded with status code=BadRequest, response={"error":"partial write:\nunable to parse 'Influx-Capacitor-Metadata,counter=queueCount,hostname=HOSTNAME,version=1.0.18.0,action=Send,targetServer=http://ENDPOINT,targetDatabase=DATABASE,failMessage=InfluxDb\\ API\\ responded\\ with\\ status\\ code\\=BadRequest\\,\\ response\\={\"error\":\"partial\\ write:\\nunable\\ to\\ parse\\ 'Influx-Capacitor-Metadata\\,counter\\=queueCount\\,hostname\\=HOSTNAME\\,version\\=1.0.18.0\\,action\\=Send\\,targetServer\\=http://ENDPOINT\\,targetDatabase\\=DATABASE\\,failMessage\\=InfluxDb\\\\\\ API\\\\\\ responded\\\\\\ with\\\\\\ status\\\\\\ code\\\\\\=BadRequest\\\\\\,\\\\\\ response\\\\\\={\\\"error\\\":\\\"unable\\\\\\ to\\\\\\ parse\\\\\\ 'Influx-Capacitor-Metadata\\\\\\,counter\\\\\\=queueCount\\\\\\,hostname\\\\\\=HOSTNAME\\\\\\,version\\\\\\=1.0.18.0\\\\\\,action\\\\\\=Send\\\\\\,targetServer\\\\\\=http://ENDPOINT\\\\\\,targetDatabase\\\\\\=DATABASE\\\\\\,failMessage\\\\\\=InfluxDb\\\\\\\\\\\\\\ API\\\\\\\\\\\\\\ responded\\\\\\\\\\\\\\ with\\\\\\\\\\\\\\ status\\\\\\\\\\\\\\ code\\\\\\\\\\\\\\=ServiceUnavailable\\\\\\\\\\\\\\,\\\\\\\\\\\\\\ response\\\\\\\\\\\\\\=\\\\u003chtml\\\\u003e\\\\u003cbody\\\\u003e\\\\u003ch1\\\\u003e503\\\\\\\\\\\\\\ Service\\\\\\\\\\\\\\ Unavailable\\\\u003c/h1\\\\u003e':\\\\\\ missing\\\\\\ fields\\\\nunable\\\\\\ to\\\\\\ parse\\\\\\ 'No\\\\\\\\\\\\\\ server\\\\\\\\\\\\\\ is\\\\\\\\\\\\\\ available\\\\\\\\\\\\\\ to\\\\\\\\\\\\\\ handle\\\\\\\\\\\\\\ this\\\\\\\\\\\\\\ request.':\\\\\\ missing\\\\\\ fields\\\\nunable\\\\\\ to\\\\\\ parse\\\\\\ '\\\\u003c/body\\\\u003e\\\\u003c/html\\\\u003e':\\\\\\ missing\\\\\\ fields\\\"}':\\ missing\\ fields\\nunable\\ to\\ parse\\ 'value\\=1.0\\,queueCountChange\\=-594i\\,sendTimeMs\\=4062.0\\ 1463822245574':\\ invalid\\ field\\ format\"}': missing fields\nunable to parse 'value=31.0,queueCountChange=0i,sendTimeMs=17766.0 1463822279293': invalid field format"}

WARN - 21/05/2016 06:18:09: Dropping 52 since the exception type InfluxDB.Net.Infrastructure.Influx.InfluxDbApiException is not allowed for resend.
ERROR - One or more errors occurred.

This issue is temporarily fixed only when Influx-Capacitor is restarted.
I'm using Capacitor 1.0.18.0.

Dual feed (more than 1 influxDB target)

I think my request is perhaps not-so-simple to implement, but it would be interesting if we could define more than 1 InfluxDB target.
In my environment we would like to feed 2 different InfluxDB (on 2 different sites), and a simple approach would be to dual feed (other approaches like InfluxDB proxy or clusters do not seem to be reliable for the moment).
What do you think about that ?

Not all instances showing

I'm not entirely sure where to go with this one... but I'm trying to pull counters from
.NET CLR Remoting - Remote Calls/sec

Locally from performance monitor, I can see all the instances on the machine.
Influx Capacitor seems only able to see itself, and the Global instance - both which indicate 0 all the time.

Global on the performance-monitor view shows me what I'd expect.

It smells like a permission issue, but even with the service running as the same user as I use interactively, I get different results.

Any help greatly appreciated.

Application stops collecting data

Hi,
I'm facing the issue as follows:
I have Influx-capacitor (checked both 1.18.0.0 and 1.18.0.3 version) installed on one of my hosts and try to collect perfmon counters from couple of remote machines. I use console version just to watch it working, but it behaves the same way with the service version. After some time from the counter start I can see a sequence of messages like:

Engine A: Dropping X steps.
Engine A: Dropping X steps.
Engine A: Dropping X steps.
Engine A: Dropping X steps.
Engine B: Dropping X steps.
Engine A: Dropping X steps.
Engine A: Dropping X steps.
Engine A: Missing 6 cycles. Resetting and starting over.

...and the application stops logging data into database. The only way to make it functional again is restart (in case of service - kill the process - as stop action on the service is timing out).
I use InfluxDB ver. 0.12.2 and Grafana ver. 3.0.0-beta7 (also tried 3.0.0-beta5)

Best Regards
Tomasz

Cannot change config from console application

If the console application is not started with elevated security, is not able to update the configuration files.

Have the console elevate security when updating configuration, as is done when restarting the service.

Completely silent setup

Not sure I missed something, but I don't find it easy to automate the Influx-Capacitor setup without having sometimes a problem.

I succeded it by creating the "C:\ProgramData\Thargelion\Influx-Capacitor*.xml" directories and files, and then call the msi setup with /q parameter, but if, for example, the influxdb server is temporary unreachable, setup will be stuck on the Influx-Capacitor console with the error message.

Would it be possible to have a command line parameter that always exits silently (no blocking) with just a message and an exit code to be checked ?

Many thanks for this usefull tool !

Influxdb 0.9x support

Grafana 2.1pre build now has good support for influx 0.9 tags and measurments. Your tool could be what the windows shops out there need if u get it right.

Good luck!

Service stops

If connection to influx is interrupted the service stops.

The service also stops, and does not start again, if there are other issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.