-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If node id data type is Boolean which type need to put #3
Comments
Hi @dineshmerck ! |
i have changed to true also but still i can see the value is 0. Think because of the datatype. Correct me if i am wrong |
As I said, this is because bool type is not available/implemented in this exporter. |
Pls help how to configure in telemetry exporter.
So that i can change the required file to check for other datatype like
int16,int32,Boolean and Dint, String
…On Wed, 10 Feb 2021, 8:10 pm Antoine Huret, ***@***.***> wrote:
As I said, this is because bool type is not available/implemented in this
exporter.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASXVAUAQPIAWL2H2AZXQMZTS6KLFBANCNFSM4XNAJIVA>
.
|
Hello dineshmerck, |
This line https://github.com/skilld-labs/telemetry-opcua-exporter/blob/master/collector/collector.go#L186 is the one that assume opc ua metric is a // for gauge
switch r.Value.Type() {
case ua.TypeIDFloat:
gaugeValue = r.Value.Float()
case ua.TypeIDBoolean:
if r.Value.Bool() {
gaugeValue = 1
} else {
gaugeValue = 0
}
case ...
default:
gaugeValue = r.Value.Float()
} What do you think ? |
@ahuret
In the metric, if node id have boolean datatype which one i need to put in type in config file.
type: gauge # MANDATORY metric type can be counter, gauge, Float, Double.
metrics:
help: get metrics for machine current value
nodeid: ns=4;s=|var|CODESYS Control Win V3 x64..CRS.Instances.CM.F_AnalogueSensorWired[2].Obj.Out_rCurrentValue
labels:
site: Paris
type: Float
help: get metrics for machine process
nodeid: ns=4;s=|var|CODESYS Control Win V3 x64..CRS.Instances.CM.F_AnalogueSensorWired[0].DAPCriticalProcessHi.Inp_bDefect
labels:
site: Paris
type: gauge
in the above metrics first node id is working.. but 2nd one is not working because it have Boolean datatype
Could you pls advise me on that.
The text was updated successfully, but these errors were encountered: