PowerShellExporter
PowerShellExporter copied to clipboard
Object reference not set to an instance of an object
Hi. Try to use PS-Exporter on WindowsServer 2012, but get:
2019-09-23 11:34:18.729 +03:00 [INF] Topshelf v4.1.0.172, .NET Framework v4.0.30319.34014
2019-09-23 11:34:18.760 +03:00 [INF] PowerShellExporter v0.0.3.0
2019-09-23 11:34:18.763 +03:00 [INF] Configuration url: "http://server-02:9361/metrics"
2019-09-23 11:34:18.771 +03:00 [INF] Configuration metrics: C:\soft\APP\PowerShellExporter\metrics.yml
2019-09-23 11:34:19.056 +03:00 [ERR] An exception occurred creating the host
System.NullReferenceException: Object reference not set to an instance of an object.
at Topshelf.HostConfigurators.HostConfiguratorImpl.CreateHost()
at Topshelf.HostFactory.New(Action`1 configureCallback)
2019-09-23 11:34:19.059 +03:00 [ERR] The service terminated abnormally
System.NullReferenceException: Object reference not set to an instance of an object.
at Topshelf.HostConfigurators.HostConfiguratorImpl.CreateHost()
at Topshelf.HostFactory.New(Action`1 configureCallback)
at Topshelf.HostFactory.Run(Action`1 configureCallback)
2019-09-23 11:34:31.839 +03:00 [INF] Configuration Result:
[Success] Name PowerShellExporter
[Success] DisplayName PowerShellExporter (Instance: 001)
[Success] Description Exports the results of PowerShell cmdlets as Prometheus Gauge Metrics
[Success] InstanceName 001
[Success] ServiceName PowerShellExporter$001
2019-09-23 11:34:31.925 +03:00 [INF] Topshelf v4.1.0.172, .NET Framework v4.0.30319.34014
2019-09-23 11:34:31.945 +03:00 [INF] PowerShellExporter v0.0.3.0
2019-09-23 11:34:31.947 +03:00 [INF] Configuration url: "http://server-02:9361/metrics"
2019-09-23 11:34:31.952 +03:00 [INF] Configuration metrics: C:\soft\APP\PowerShellExporter\metrics.yml
2019-09-23 11:34:32.155 +03:00 [ERR] An exception occurred creating the host
System.NullReferenceException: Object reference not set to an instance of an object.
at Topshelf.HostConfigurators.HostConfiguratorImpl.CreateHost()
at Topshelf.HostFactory.New(Action`1 configureCallback)
2019-09-23 11:34:32.157 +03:00 [ERR] The service terminated abnormally
System.NullReferenceException: Object reference not set to an instance of an object.
at Topshelf.HostConfigurators.HostConfiguratorImpl.CreateHost()
at Topshelf.HostFactory.New(Action`1 configureCallback)
at Topshelf.HostFactory.Run(Action`1 configureCallback)
How to fix it?
@barebu Hello, did you manage to get rid of this ? Regards,