influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.51k stars 5.55k forks source link

Builds for Linux on OpenPOWER (ppc64le) #8431

Closed aklyachkin closed 3 years ago

aklyachkin commented 3 years ago

Feature Request

Add building packages for Linux/ppc64le

Proposal:

Add new architecture to Makefile. GOARCH=ppc64le. The architecture is supported by Golang since 1.8. There are no additional resources needed, just adding several lines to Makefile. The pull request will follow.

Current behavior:

No packages for ppc64le.

Desired behavior:

Packages for ppc64le are built automatically together with other packages.

Use case:

OpenPOWER is open hardware architecture based on IBM POWER CPUs. It is supported and promoted by OpenPOWER Foundation (https://en.wikipedia.org/wiki/OpenPOWER_Foundation) and is in use by the biggest supercomputers (https://top500.org/top500/lists/2020/11/), some big cloud providers (https://www.forbes.com/sites/patrickmoorhead/2018/03/19/headed-into-its-fifth-year-openpower-has-momentum-into-the-power9-generation/?sh=232c26bc78a8) and many big enterprises.

The fix is obvious and doesn't require any change in the code.

aklyachkin commented 3 years ago

The artifact test on a ppc64le system:

[root@docker ~]# uname -a
Linux docker.enfence.net 3.10.0-1127.8.2.el7.ppc64le #1 SMP Tue May 12 17:19:03 UTC 2020 ppc64le ppc64le ppc64le GNU/Linux
[root@docker ~]# curl -L -O https://69482-33258973-gh.circle-artifacts.com/0/build/dist/telegraf-1.16.2%7Eeeadf27b_linux_ppc64le.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   492  100   492    0     0    638      0 --:--:-- --:--:-- --:--:--   638
100 17.1M  100 17.1M    0     0   868k      0  0:00:20  0:00:20 --:--:--  502k
[root@docker ~]# tar xf telegraf-1.16.2%7Eeeadf27b_linux_ppc64le.tar.gz
[root@docker ~]# cd telegraf-1.16.2
telegraf-1.16.2/                                 telegraf-1.16.2%7Eeeadf27b_linux_ppc64le.tar.gz
[root@docker ~]# cd telegraf-1.16.2
[root@docker telegraf-1.16.2]# ls
etc  usr  var
[root@docker telegraf-1.16.2]# cd usr/bin/
[root@docker bin]# ls
telegraf
[root@docker bin]# ./telegraf --config ../../etc/telegraf/telegraf.conf --test
2020-11-18T11:12:27Z I! Starting Telegraf
> kernel,host=docker.enfence.net boot_time=1598975039i,context_switches=1772212435i,entropy_avail=2296i,interrupts=888017368i,processes_forked=9048723i 1605697947000000000
> swap,host=docker.enfence.net free=431947776i,total=431947776i,used=0i,used_percent=0 1605697947000000000
> swap,host=docker.enfence.net in=0i,out=0i 1605697947000000000
> disk,device=dm-0,fstype=xfs,host=docker.enfence.net,mode=rw,path=/ free=90601406464i,inodes_free=82896881i,inodes_total=84719616i,inodes_used=1822735i,total=173495287808i,used=82893881344i,used_percent=47.77875087635533 1605697947000000000
> disk,device=sda2,fstype=xfs,host=docker.enfence.net,mode=rw,path=/boot free=702205952i,inodes_free=523999i,inodes_total=524288i,inodes_used=289i,total=1063256064i,used=361050112i,used_percent=33.95702354536489 1605697947000000000
> diskio,host=docker.enfence.net,name=sdb io_time=5069810i,iops_in_progress=0i,merged_reads=1147i,merged_writes=10930688i,read_bytes=7689915904i,read_time=368630i,reads=414953i,weighted_io_time=368261470i,write_bytes=833928635392i,write_time=367893200i,writes=34331914i 1605697947000000000
> system,host=docker.enfence.net load1=0,load15=0.05,load5=0.01,n_cpus=4i,n_users=0i 1605697947000000000
> system,host=docker.enfence.net uptime=6722908i 1605697947000000000
> system,host=docker.enfence.net uptime_format="77 days, 19:28" 1605697947000000000
> diskio,host=docker.enfence.net,name=sdb1 io_time=4891600i,iops_in_progress=0i,merged_reads=1147i,merged_writes=10930688i,read_bytes=7687687680i,read_time=368600i,reads=414932i,weighted_io_time=363843100i,write_bytes=833928635392i,write_time=363478070i,writes=31952482i 1605697947000000000
> diskio,host=docker.enfence.net,name=sda io_time=4271000i,iops_in_progress=0i,merged_reads=735i,merged_writes=193769i,read_bytes=2113501696i,read_time=26830i,reads=45830i,weighted_io_time=23187430i,write_bytes=84237544960i,write_time=23163050i,writes=5292309i 1605697947000000000
> diskio,host=docker.enfence.net,name=sda1 io_time=9270i,iops_in_progress=0i,merged_reads=0i,merged_writes=0i,read_bytes=1582694400i,read_time=9270i,reads=24146i,weighted_io_time=9270i,write_bytes=0i,write_time=0i,writes=0i 1605697947000000000
> mem,host=docker.enfence.net active=21708537856i,available=66316468224i,available_percent=96.6218461397438,buffered=5636096i,cached=32736149504i,commit_limit=34749480960i,committed_as=1784938496i,dirty=0i,free=33875623936i,high_free=0i,high_total=0i,huge_page_size=0i,huge_pages_free=0i,huge_pages_total=0i,inactive=9479520256i,low_free=0i,low_total=0i,mapped=257622016i,page_tables=2752512i,shared=167116800i,slab=3098869760i,sreclaimable=1974599680i,sunreclaim=1124270080i,swap_cached=0i,swap_free=431947776i,swap_total=431947776i,total=68635066368i,used=2017656832i,used_percent=2.9396880323273065,vmalloc_chunk=8795869741056i,vmalloc_total=8796093022208i,vmalloc_used=144048128i,write_back=0i,write_back_tmp=0i 1605697947000000000
> diskio,host=docker.enfence.net,name=sda2 io_time=1210i,iops_in_progress=0i,merged_reads=0i,merged_writes=17i,read_bytes=7567872i,read_time=220i,reads=1707i,weighted_io_time=6100i,write_bytes=49762816i,write_time=5880i,writes=182i 1605697947000000000
> diskio,host=docker.enfence.net,name=sda3 io_time=4082290i,iops_in_progress=0i,merged_reads=735i,merged_writes=193752i,read_bytes=521011200i,read_time=17330i,reads=19956i,weighted_io_time=19223780i,write_bytes=84187782144i,write_time=19208490i,writes=2912695i 1605697947000000000
> diskio,host=docker.enfence.net,name=dm-0 io_time=7097200i,iops_in_progress=0i,merged_reads=0i,merged_writes=0i,read_bytes=8198016512i,read_time=392160i,reads=436641i,weighted_io_time=693503450i,write_bytes=918116417536i,write_time=692897910i,writes=46307043i 1605697947000000000
> diskio,host=docker.enfence.net,name=dm-1 io_time=10i,iops_in_progress=0i,merged_reads=0i,merged_writes=0i,read_bytes=3866624i,read_time=10i,reads=47i,weighted_io_time=10i,write_bytes=0i,write_time=0i,writes=0i 1605697947000000000
> processes,host=docker.enfence.net blocked=0i,dead=0i,idle=0i,paging=0i,running=1i,sleeping=124i,stopped=0i,total=125i,total_threads=239i,unknown=0i,zombies=0i 1605697947000000000
> cpu,cpu=cpu0,host=docker.enfence.net usage_guest=0,usage_guest_nice=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_user=0 1605697948000000000
> cpu,cpu=cpu1,host=docker.enfence.net usage_guest=0,usage_guest_nice=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_user=0 1605697948000000000
> cpu,cpu=cpu2,host=docker.enfence.net usage_guest=0,usage_guest_nice=0,usage_idle=97.95918372001613,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=2.040816325458613,usage_user=0 1605697948000000000
> cpu,cpu=cpu3,host=docker.enfence.net usage_guest=0,usage_guest_nice=0,usage_idle=100,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_user=0 1605697948000000000
> cpu,cpu=cpu-total,host=docker.enfence.net usage_guest=0,usage_guest_nice=0,usage_idle=99.50000010430813,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0.49999999991996447,usage_user=0 1605697948000000000
zak-pawel commented 3 years ago

@aklyachkin Did you try to run tests for this architecture? Do they pass?

GOOS=linux GOARCH=ppc64le go test -v -short ./...

and

GOOS=linux GOARCH=ppc64le go test -v -race -short ./...
aklyachkin commented 3 years ago

@zak-pawel Yes, I run. The output is very long, but I don't see any FAILs:

[root@docker telegraf]# grep FAIL output*log
[root@docker telegraf]#

First output:

[root@docker telegraf]# grep -- '^---' output1.log  | grep -v PASS:
--- SKIP: TestAlignedTickerDistribution (0.00s)
--- SKIP: TestUnalignedTickerDistribution (0.00s)
--- SKIP: TestRollingTickerDistribution (0.00s)
--- SKIP: TestConfig_SliceComment (0.00s)
--- SKIP: TestRunTimeout (0.00s)
--- SKIP: TestRunTimeoutFastExit (0.00s)
--- SKIP: TestCombinedOutputTimeout (0.00s)
--- SKIP: TestRandomSleep (0.00s)
--- SKIP: TestWindowsSeparator (0.00s)
--- SKIP: TestAerospikeStatistics (0.00s)
--- SKIP: TestAerospikeStatisticsPartialErr (0.00s)
--- SKIP: TestSelectNamepsaces (0.00s)
--- SKIP: TestDisableQueryNamespaces (0.00s)
--- SKIP: TestQuerySets (0.00s)
--- SKIP: TestSelectQuerySets (0.00s)
--- SKIP: TestDisableTTLHistogram (0.00s)
--- SKIP: TestTTLHistogram (0.00s)
--- SKIP: TestDisableObjectSizeLinearHistogram (0.00s)
--- SKIP: TestObjectSizeLinearHistogram (0.00s)
--- SKIP: TestDisqueGeneratesMetrics (0.00s)
--- SKIP: TestDisqueCanPullStatsFromMultipleServers (0.00s)
--- SKIP: TestGathering (0.00s)
--- SKIP: TestGatheringMxRecord (0.00s)
--- SKIP: TestGatheringRootDomain (0.00s)
--- SKIP: TestMetricContainsServerAndDomainAndRecordTypeTags (0.00s)
--- SKIP: TestGatheringTimeout (0.00s)
--- SKIP: TestDovecot (0.00s)
--- SKIP: TestTimeout (0.00s)
--- SKIP: TestReadsMetricsFromKafka (0.00s)
--- SKIP: TestMcrouterGeneratesMetrics (0.00s)
--- SKIP: TestMemcachedGeneratesMetrics (0.00s)
--- SKIP: TestMysqlDefaultsToLocal (0.00s)
--- SKIP: TestMysqlMultipleInstances (0.00s)
--- SKIP: TestClient1 (0.00s)
--- SKIP: TestOpenldapNoConnection (0.00s)
--- SKIP: TestOpenldapGeneratesMetrics (0.00s)
--- SKIP: TestOpenldapStartTLS (0.00s)
--- SKIP: TestOpenldapLDAPS (0.00s)
--- SKIP: TestOpenldapInvalidSSL (0.00s)
--- SKIP: TestOpenldapBind (0.00s)
--- SKIP: TestOpenldapReverseMetrics (0.00s)
--- SKIP: TestPgBouncerGeneratesMetrics (0.00s)
--- SKIP: TestPingGatherNative (0.00s)
--- SKIP: TestDNSLookupError (0.00s)
--- SKIP: TestPostgresqlGeneratesMetrics (0.00s)
--- SKIP: TestPostgresqlTagsMetricsWithDatabaseName (0.00s)
--- SKIP: TestPostgresqlDefaultsToAllDatabases (0.00s)
--- SKIP: TestPostgresqlIgnoresUnwantedColumns (0.00s)
--- SKIP: TestPostgresqlDatabaseWhitelistTest (0.00s)
--- SKIP: TestPostgresqlDatabaseBlacklistTest (0.00s)
--- SKIP: TestPostgresqlGeneratesMetrics (0.00s)
--- SKIP: TestPostgresqlQueryOutputTests (0.00s)
--- SKIP: TestPostgresqlFieldOutput (0.00s)
--- SKIP: TestPostgresqlIgnoresUnwantedColumns (0.00s)
--- SKIP: TestPrometheusGeneratesMetricsAlthoughFirstDNSFails (0.00s)
--- SKIP: TestRedisConnect (0.00s)
--- SKIP: TestGosnmpWrapper_walk_retry (0.00s)
--- SKIP: TestGosnmpWrapper_get_retry (0.00s)
--- SKIP: TestSqlServer_MultipleInstance (0.00s)
--- SKIP: TestInterval (0.00s)
--- SKIP: TestGatherRemote (0.00s)
--- SKIP: TestGatherCert (0.00s)
--- SKIP: TestZookeeperGeneratesMetrics (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: Test_escapeValue (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTemplateManagementEmptyTemplate (0.00s)
--- SKIP: TestTemplateManagement (0.00s)
--- SKIP: TestTemplateInvalidIndexPattern (0.00s)
--- SKIP: TestExec (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTopicSuffixes (0.00s)
--- SKIP: TestValidateTopicSuffixMethod (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestBasic (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTable (0.00s)
--- SKIP: TestIfName (0.00s)
[root@docker telegraf]#

Second output:

[root@docker telegraf]# grep -- '^---' output2.log  | grep -v PASS:
--- SKIP: TestAlignedTickerDistribution (0.00s)
--- SKIP: TestUnalignedTickerDistribution (0.00s)
--- SKIP: TestRollingTickerDistribution (0.00s)
--- SKIP: TestConfig_SliceComment (0.00s)
--- SKIP: TestRunTimeout (0.00s)
--- SKIP: TestRunTimeoutFastExit (0.00s)
--- SKIP: TestCombinedOutputTimeout (0.00s)
--- SKIP: TestRandomSleep (0.00s)
--- SKIP: TestWindowsSeparator (0.00s)
--- SKIP: TestAerospikeStatistics (0.00s)
--- SKIP: TestAerospikeStatisticsPartialErr (0.00s)
--- SKIP: TestSelectNamepsaces (0.00s)
--- SKIP: TestDisableQueryNamespaces (0.00s)
--- SKIP: TestQuerySets (0.00s)
--- SKIP: TestSelectQuerySets (0.00s)
--- SKIP: TestDisableTTLHistogram (0.00s)
--- SKIP: TestTTLHistogram (0.00s)
--- SKIP: TestDisableObjectSizeLinearHistogram (0.00s)
--- SKIP: TestObjectSizeLinearHistogram (0.00s)
--- SKIP: TestDisqueGeneratesMetrics (0.00s)
--- SKIP: TestDisqueCanPullStatsFromMultipleServers (0.00s)
--- SKIP: TestGathering (0.00s)
--- SKIP: TestGatheringMxRecord (0.00s)
--- SKIP: TestGatheringRootDomain (0.00s)
--- SKIP: TestMetricContainsServerAndDomainAndRecordTypeTags (0.00s)
--- SKIP: TestGatheringTimeout (0.00s)
--- SKIP: TestDovecot (0.00s)
--- SKIP: TestTimeout (0.00s)
--- SKIP: TestReadsMetricsFromKafka (0.00s)
--- SKIP: TestMcrouterGeneratesMetrics (0.00s)
--- SKIP: TestMemcachedGeneratesMetrics (0.00s)
--- SKIP: TestMysqlDefaultsToLocal (0.00s)
--- SKIP: TestMysqlMultipleInstances (0.00s)
--- SKIP: TestClient1 (0.00s)
--- SKIP: TestOpenldapNoConnection (0.00s)
--- SKIP: TestOpenldapGeneratesMetrics (0.00s)
--- SKIP: TestOpenldapStartTLS (0.00s)
--- SKIP: TestOpenldapLDAPS (0.00s)
--- SKIP: TestOpenldapInvalidSSL (0.00s)
--- SKIP: TestOpenldapBind (0.00s)
--- SKIP: TestOpenldapReverseMetrics (0.00s)
--- SKIP: TestPgBouncerGeneratesMetrics (0.00s)
--- SKIP: TestPingGatherNative (0.00s)
--- SKIP: TestDNSLookupError (0.00s)
--- SKIP: TestPostgresqlGeneratesMetrics (0.00s)
--- SKIP: TestPostgresqlTagsMetricsWithDatabaseName (0.00s)
--- SKIP: TestPostgresqlDefaultsToAllDatabases (0.00s)
--- SKIP: TestPostgresqlIgnoresUnwantedColumns (0.00s)
--- SKIP: TestPostgresqlDatabaseWhitelistTest (0.00s)
--- SKIP: TestPostgresqlDatabaseBlacklistTest (0.00s)
--- SKIP: TestPostgresqlGeneratesMetrics (0.00s)
--- SKIP: TestPostgresqlQueryOutputTests (0.00s)
--- SKIP: TestPostgresqlFieldOutput (0.00s)
--- SKIP: TestPostgresqlIgnoresUnwantedColumns (0.00s)
--- SKIP: TestPrometheusGeneratesMetricsAlthoughFirstDNSFails (0.00s)
--- SKIP: TestRedisConnect (0.00s)
--- SKIP: TestGosnmpWrapper_walk_retry (0.00s)
--- SKIP: TestGosnmpWrapper_get_retry (0.00s)
--- SKIP: TestSqlServer_MultipleInstance (0.00s)
--- SKIP: TestGatherRemote (0.00s)
--- SKIP: TestGatherCert (0.00s)
--- SKIP: TestZookeeperGeneratesMetrics (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: Test_escapeValue (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTemplateManagementEmptyTemplate (0.00s)
--- SKIP: TestTemplateManagement (0.00s)
--- SKIP: TestTemplateInvalidIndexPattern (0.00s)
--- SKIP: TestExec (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTopicSuffixes (0.00s)
--- SKIP: TestValidateTopicSuffixMethod (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestBasic (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestConnectAndWrite (0.00s)
--- SKIP: TestTable (0.00s)
--- SKIP: TestIfName (0.00s)
ssoroka commented 3 years ago

https://github.com/influxdata/telegraf/pull/8432 merged