cisco: debug command to write a readonly snmp oid? - monitoring

i want to write a readonly snmp oid on a cisco 886va-w to test a network management system called librenms. is there any debug command available for this purpose? the oids belongs to some error counters but there is no error at the moment, so the graphes in librenms doesn't show any activity.

If you constrain yourself to use the real device, you'll have to create the error condition that increments that counter. That is usually hard to do.
Google "mimic simulator" on how to test your app with a simulator that will allow you to create whatever condition you want.

Related

How can I get a list of devices that support a specific OID?

I need to get a list of the devices that support the OID .1.3.6.1.2.1.31.1.1.1.1 in my network. Is there a command for doing that?
No, there is no such command. Basically, you should write the script/app to perform a pretty simple discovery of your network. Within the discovery process you'll have to scan the IP address range to find out if the target devices respond to this particular OID. Otherwise you'll receive SNMP: no such object error or even end up having SNMP timeout.

Test driven development on iOS for network connections

Struggling to find a good TDD process on iOS for network connection tests.
At the moment I am manually testing the functionality by manually switching off / on my Mac network connection.
Any suggestions?
If you are test-driving, I would remove the real network from the picture. I'd mock out the API which returns an error code or throws an error (Kiwi has a nice ability to replace real methods during tests) to force it to respond the way you'd like.
If you're not sure how the API will respond in your circumstance, I would spike that using network link conditioner or other methods with copious logging in your program. Once you determine how the condition looks to your program, go back to TDD with mocks.
It's often useful to wrap the network API with your own class to give you a more stable thing to mock.
Network Link Conditioner. You can download it from developer.apple.com

When is it appropriate to mark services as not stoppable?

Services can be marked as "not stoppable":
In C/C++ by specifying SERVICE_ACCEPT_STOP flag when calling SetServiceStatus (see SERVICE_STATUS for details).
If .NET, by set ServiceBase.CanStop to false.
However, is this good practice? It means that even a user with administrator privileges cannot stop such a service in a clean manner. (It would still be possible to kill it, but this would prevent proper cleanup. And if there are other services running in the same process, they would be killed as well.)
In my specific case, I have a service which controls a scientific instrument. It has been suggested to make the service not stoppable while it is acquiring data from the instrument in order to prevent losing the data being acquired. I should add that:
We grant non-administrator users the right to start/stop the service
We have program that provides a UI to start/stop this service. This program will issue a warning if the user tries to stop the service during acquisition. However, it is of course also possible to stop is with SC.EXE or the "Services" snap-in. In this case, there is no warning.
Does Microsoft (or anyone else) provide guidance?
My own stance so far is that marking a service not stoppable is a drastic measure that should be used sparingly. Acceptable uses would be:
For brief periods of time, to protect critical operations that should not be interrupted
For services that are critical for the operation or security of the OS
My example would not fall under those criteria, so should be stoppable

Checking cisco network device rules programmatically

I want to be able to show (by device) open/blocked status for a given protocol between two devices/ports on a network. In other words, I need to output a list of network devices (firewalls & switches) between Server A and Server B and indicate whether the request should (according to each device's rules) be allowed through or blocked.
I'm starting with the Cisco networking devices, which are centrally managed by Cisco's Security Manager (CSM) application (version 4.2). I'm new to network management automation programming and want to make sure I'm not overlooking an obvious best way to handle this.
So far it's looking like I'll need to periodically export and ETL device rules out of CSM (they have a perl script that I can call to do this I believe) and into a separate database, then write some custom SQL code to determine which devices on a route between two hosts/ports will allow or block traffic of the given protocol?
Am I on the right track, or is there a better way to go about this?
If I understood your question, I think you can run a TCL script inside the Cisco equipments do collect the necessary information and transfer it to a central server, form there import it to a database and then correlate that information.
Hope that helps you in your work.

Monitoring IP phones with Zenoss 3.0 Core

I have the following situation. I have some IP phones configured and registered in to a CCM in the lab. I have already enabled the SNMP service in CCM and I'm able to make a SNMP walk using a linux shell (the community and the version are OK). I would like to monitor the amount of IP phones that are registered/unregistered using Zenoss.
The CCM OID for those request are the following:
ccmRegisteredPhones : 1.3.6.1.4.1.9.9.156.1.5.5.0
ccmUnregisteredPhones : 1.3.6.1.4.1.9.9.156.1.5.6.0
I'm able to get the value (number of registered and unregistered phones in the server) using the smnpwalk in the command line.
Everything works 'till now, but I would like to monitor those values using Zenoss and make an alarm wheter the amount of unregistered phones is below a value.
I would like to know the steps I have to follow in Zenoss 3.0 Core to get those request working/monitoring since I can't get anything clear from the Zenos UserGuide.
I would really appreciate any help or guidance.
Best regards
Create a new monitoring template called "CCMPhones" or something like that. Add two SNMP datasources to this monitoring template. The convention would be to name them after the OIDs: ccmRegisteredPhones and ccmUnregisteredPhones. Put the appropriate OIDs from your question as the OIDs for these datasources.
You can then add these to a graph and create thresholds for them if desired.
At this point you have the monitoring ready to go, but it isn't being applied to any devices. I would recommend creating a device class for your CCM devices. If they're Linux-based you'd create /Server/Linux/CCM and place your CCM devices there. Then in that device class you can click over to More and choose "Bind Templates" from the gear menu in the bottom left. Select your CCMPhones template.
Now any devices you put into the /Server/Linux/CCM device class will have the CCMPhones monitoring applied to them.

Resources