Hi All,
Befor I use DB connect plugin, I use python-sdk to check out disabled status of data_input, here is my code:
data_input = service.inputs[title]
# Print the input's current properties
print "\nDisabled:", data_input["disabled"], " <--"
if data_input["disabled"] == '1':
print "\nSince data input \"" + data_input.name + "\" is disabled(\"1\") now, enable the data port now..."
# Modify a disabled
kwargs = {"disabled": 0}
# Update changes on the server
data_input.update(**kwargs).refresh()
# Display the new status
print "\nDisabled:", data_input["disabled"], " <--"
else:
pass
It's work and print:
Title: 10514
Connection_host: ip
Host: sdk-test-mod
Index: default
Sourcetype: syslog
Disabled: 1 <--
Since data input "10514" is disabled("1") now, enable the data port now...
Disabled: 0 <--
Since this case, I try to run my code to check out the disabled status of db connect, but I got this error:
http 500 bad request, feature "disabled" not supported from this handler.
Any way or suggestion I can debug?
Thank you!!
... View more