Closed gmeks closed 5 years ago
Hi @gmeks,
.NET Core/.NET Standard support is currently on the Roadmap
It is currently blocked by two issues
dotnet pack
does not currently pack embedded license files properly for *.snupkg files (supposed to be fixed in the next release, which should mean .NET Core 3.0 Preview 2, which is apparently "close to release")I have been eagerly checking the status of both of these every day, so this is definitely something I'm keen to accomplish as soon as possible.
In regards to creating SNMP sensors, this can be easily done by following the guidelines for creating Dynamic Parameters
In short
client.GetSensorTypes()
)client.GetDynamicSensorParameters()
)client.AddSensor()
Please let me know if you have any further questions
Regards, lordmilko
Sorry, i did not notice the roadmap.
I got the examples of when you pointed me the correct direction, but i dont see a way of finding out what the custom field is for the service snmp monitoring?
Sorry, I don't understand what you're asking
What type of SNMP sensor are you trying to create exactly? (i.e. what is it called on the Add Sensors page of the PRTG UI)
My preception is that your documentation is focused around basically extracting or adjusting existing sensors. What im doing is connecting our deployment system to PRTG, and it will automatically create needed sensors as new installations are created by deployment system.
With your help i was able to create HTTP sensor, for the web part.
Im currently struggling with creating of the "snmpservice" sensor, this sensor will need the name service, and i simply cannot figure out how to do that.
Thanks @gmeks,
The following general outline should describe how to create a new SNMP Service sensor
// Get a set of sensor parameters for creating an SNMP Service sensor from the device
// with ID 1001
var parameters = client.GetDynamicSensorParameters(1001, "snmpservice");
Targets
property of the parameters object. For more information, see Targets on the wiki// I'm not sure what the property is called that stores the services, but you should
// be able to see in the debugger (recommended) or by inspecting the HTML of the
// SNMP Services table in the PRTG UI when trying to create the object.
// Here I've just called it "property_name"
parameters.property_name = parameters.Targets["property_name"].Where(t => t.Name.Contains("Print")).ToArray();
// Add the sensor to any device, e.g. the one with ID 2002
client.AddSensor(2002, parameters);
I recommend having a look at both the Targets section of the DynamicSensorParameters page as well as potentially having a read through the Overview of the Sensor Targets page if there is still any confusion
Please let me know if this clears things up for you or if you have any further questions
Regards, lordmilko
Yea i have been checking target because it seemed natural. But it was always emty.
But i think i found the actually problem on my end, the devices i was adding where added with the wrong IP address. So all SNMP sensors where not going to work.
Im gonna fix this and report back.
If you try and retrieve dynamic sensor parameters from a device that does not support monitoring SNMP Services then the targets list will be empty. Similarly, if you attempt to create a new SNMP Services sensor for a device using the PRTG UI, if the device does not support monitoring SNMP Services you will not have any services listed there either.
If the Add New SNMP Service Sensor page in the PRTG UI shows services for a given device, then you should also see Targets for it within PrtgAPI
Yes thats how i discovered the error, i was gonna get a screenshot of code and UI showing they where getting different results.
I got everything working now.
Thank you for all the great support.
Hey is it possible to add a .net core build for NuGet packages?
It would also be nice if some of the examples included how to setup snmp sensors?