novaquark/sysinfo_influxdb — pull request #7 by BarthV (2014-08-14 23:11:51+00:00)
Title: Added FQDN append feature

Hi,

For my own needs (Influx/Grafana integration), I wanted to have host FQDN included in raw data structure.
To do that, I added a new boolean option to add FQDN directly in injected raw data.

__default behaviour :__
```
> ./sysinfo_influxdb -c="mem,uptime,swap"

#0: server-01.mem
| free	| used	| actualfree	| actualused	| total	|
| 5484720128	| 2749816832	| 6962950144	| 1271586816	| 8234536960	|

#1: server-01.uptime
| length	|
| 25474	|

#2: server-01.swap
| free	| used	| total	|
| 4094685184	| 0	| 4094685184	|
```

__new behaviour with FQDN flag:__
```
> ./sysinfo_influxdb -c="mem,uptime,swap" -P="metrics" --fqdn

#0: metrics.swap
| free	| used	| total	| fqdn	|
| 4094685184	| 0	| 4094685184	| server-01.mycompany.com	|

#1: metrics.mem
| free	| used	| actualfree	| actualused	| total	| fqdn	|
| 5507203072	| 2727333888	| 6971310080	| 1263226880	| 8234536960	| server-01.mycompany.com	|

#2: metrics.uptime
| length	| fqdn	|
| 25652	| server-01.mycompany.com	|
```

Hope this will help people, but I'm quite sure that this kind of data structure can be helpful and is still "mandatory" in some kind of queries.
Thanks for reviewing this ! I'm totally a Go-newbie so don't hesitate to fix some of my loops / if / global logic :-) !

Barth