Merge pull request #1152 from breed808/wmi_upstream_change

chore(deps): Update wmi to v1.2.2
This commit is contained in:
Ben Reedy
2023-03-12 17:41:01 +10:00
committed by GitHub
35 changed files with 36 additions and 41 deletions

View File

@@ -94,7 +94,7 @@ jobs:
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v3 uses: golangci/golangci-lint-action@v3
with: with:
version: v1.45.2 version: v1.51.2
args: "--timeout=5m" args: "--timeout=5m"
# golangci-lint action doesn't always provide helpful output, so re-run without the action for # golangci-lint action doesn't always provide helpful output, so re-run without the action for

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -8,9 +8,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -7,9 +7,9 @@ import (
"errors" "errors"
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -1,9 +1,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -1,8 +1,8 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {
@@ -560,7 +560,6 @@ func newMSCluster_ClusterCollector() (Collector, error) {
// MSCluster_Cluster docs: // MSCluster_Cluster docs:
// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-cluster // - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-cluster
//
type MSCluster_Cluster struct { type MSCluster_Cluster struct {
Name string Name string

View File

@@ -1,8 +1,8 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {
@@ -56,7 +56,6 @@ func newMSCluster_NetworkCollector() (Collector, error) {
// MSCluster_Network docs: // MSCluster_Network docs:
// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-network // - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-network
//
type MSCluster_Network struct { type MSCluster_Network struct {
Name string Name string

View File

@@ -1,8 +1,8 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {
@@ -119,7 +119,6 @@ func newMSCluster_NodeCollector() (Collector, error) {
// MSCluster_Node docs: // MSCluster_Node docs:
// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-node // - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-node
//
type MSCluster_Node struct { type MSCluster_Node struct {
Name string Name string

View File

@@ -1,8 +1,8 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {
@@ -133,7 +133,6 @@ func newMSCluster_ResourceCollector() (Collector, error) {
// MSCluster_Resource docs: // MSCluster_Resource docs:
// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resource // - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resource
//
type MSCluster_Resource struct { type MSCluster_Resource struct {
Name string Name string
Type string Type string

View File

@@ -1,8 +1,8 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {
@@ -114,7 +114,6 @@ func newMSCluster_ResourceGroupCollector() (Collector, error) {
// MSCluster_ResourceGroup docs: // MSCluster_ResourceGroup docs:
// - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resourcegroup // - https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resourcegroup
//
type MSCluster_ResourceGroup struct { type MSCluster_ResourceGroup struct {
Name string Name string

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"
) )

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -9,9 +9,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"
) )

View File

@@ -8,9 +8,9 @@ import (
"strings" "strings"
"syscall" "syscall"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
"golang.org/x/sys/windows" "golang.org/x/sys/windows"
"golang.org/x/sys/windows/svc/mgr" "golang.org/x/sys/windows/svc/mgr"
"gopkg.in/alecthomas/kingpin.v2" "gopkg.in/alecthomas/kingpin.v2"

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -7,9 +7,9 @@ import (
"errors" "errors"
"strings" "strings"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
const ConnectionBrokerFeatureID uint32 = 133 const ConnectionBrokerFeatureID uint32 = 133

View File

@@ -3,9 +3,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -6,9 +6,9 @@ package collector
import ( import (
"errors" "errors"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -4,9 +4,9 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/yusufpapurcu/wmi"
) )
func init() { func init() {

View File

@@ -20,9 +20,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/StackExchange/wmi"
"github.com/prometheus-community/windows_exporter/collector" "github.com/prometheus-community/windows_exporter/collector"
"github.com/prometheus-community/windows_exporter/config" "github.com/prometheus-community/windows_exporter/config"
"github.com/yusufpapurcu/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/collectors"

2
go.mod
View File

@@ -4,7 +4,6 @@ go 1.13
require ( require (
github.com/Microsoft/hcsshim v0.9.7 github.com/Microsoft/hcsshim v0.9.7
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f
github.com/dimchansky/utfbom v1.1.1 github.com/dimchansky/utfbom v1.1.1
github.com/go-kit/log v0.2.1 github.com/go-kit/log v0.2.1
github.com/go-ole/go-ole v1.2.6 github.com/go-ole/go-ole v1.2.6
@@ -14,6 +13,7 @@ require (
github.com/prometheus/common v0.39.0 github.com/prometheus/common v0.39.0
github.com/prometheus/exporter-toolkit v0.8.2 github.com/prometheus/exporter-toolkit v0.8.2
github.com/sirupsen/logrus v1.9.0 github.com/sirupsen/logrus v1.9.0
github.com/yusufpapurcu/wmi v1.2.2
golang.org/x/sys v0.4.0 golang.org/x/sys v0.4.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1

4
go.sum
View File

@@ -98,8 +98,6 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f h1:5ZfJxyXo8KyX8DgGXC5B7ILL8y51fci/qYz2B4j8iLY=
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@@ -744,6 +742,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=

View File

@@ -8,7 +8,7 @@ import (
) )
// WKSTAInfo102 is a wrapper of WKSTA_Info_102 // WKSTAInfo102 is a wrapper of WKSTA_Info_102
//https://docs.microsoft.com/en-us/windows/win32/api/lmwksta/ns-lmwksta-wksta_info_102 // https://docs.microsoft.com/en-us/windows/win32/api/lmwksta/ns-lmwksta-wksta_info_102
type wKSTAInfo102 struct { type wKSTAInfo102 struct {
wki102_platform_id uint32 wki102_platform_id uint32
wki102_computername *uint16 wki102_computername *uint16

View File

@@ -1,4 +1,4 @@
//This package allows us to initiate Time Sensitive components (Like registering the windows service) as early as possible in the startup process // This package allows us to initiate Time Sensitive components (Like registering the windows service) as early as possible in the startup process
package initiate package initiate
import ( import (

View File

@@ -1,6 +1,6 @@
package collector package collector
import ( import (
"github.com/StackExchange/wmi" "github.com/yusufpapurcu/wmi"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus-community/windows_exporter/log" "github.com/prometheus-community/windows_exporter/log"
) )