Hello there!
This is my very first post in this community, so please be patient with me.
We have the NPM up and running and try to add nodes using the SDK. With curl in a shell script adding the node and interfaces just works fine.
What I can't get to work is the node details to be polled. I add the node with an empty caption and either it stays empty or sometimes the IP gets filled in as the displayed name.
I add a couple of pollers (not quite sure which ones I need for Cisco routers, an 1812 for example) and send a PollNow to the newly created node using this code:
#
# Add Pollers for the newly added device.
#
CREATE_POLLER_URL="https://$ORION_SERVER:$PORT/SolarWinds/InformationService/v3/Json/Create/Orion.Pollers"
for POLLER in "N.Uptime.SNMP.Generic" "N.Details.SNMP.Generic" "N.Topology.Snmp.Layer3" "N.Status.ICMP.Native" "N.ResponseTime.ICMP.Native"
do
JSON_STRING="{\"NetObject\":\"N:$NODE_ID\", \"NetObjectType\":\"N\", \"NetObjectID\":\"$NODE_ID\", \"PollerType\":\"$POLLER\"}"
CMD="curl -s -S -k -X POST -H 'Content-Type: application/json' $CREDENTIALS -d '$JSON_STRING' $CREATE_POLLER_URL"
POLLER_RESULT=`eval $CMD`
echo "Registered Poller $POLLER (Result: $POLLER_RESULT) for Node \"$NODE_ID\""
done
# Send PollNow to newly created node.
POLLNOW_URL="https://$ORION_SERVER:$PORT/SolarWinds/InformationService/v3/Json/Invoke/Orion.Nodes/PollNow"
CMD="curl -s -S -k -X POST -H 'Content-Type: application/json' -d '[\"N:$NODE_ID\"]' $CREDENTIALS $POLLNOW_URL"
OUTPUT=`eval $CMD`
The response I get from the PollNow invoke above is "null". Am I doing it wrong somehow? Can somebody give any hints why the PollNow does not work?
Thanks for any help!
Daniel.