0

Is it possible to use SNMP to detect and report events for an sd-card? Trapping based on available space is straightforward but I don't see a way to notify when a card is tampered with.

ethrbunny
  • 2,327
  • 4
  • 36
  • 72
  • You mainly have to find a way to detect the event - whatever you consider relevant (I don't know what you mean with "tampered with"). The SNMP part is not really relevant in this context because, as you said, generating traps is easy. – Sven Jun 25 '13 at 15:17
  • Its the detection that has me stuck. I can use cmds like `blkid` and `fdisk` and grep out what I need but these have to be run to work. – ethrbunny Jun 25 '13 at 15:34
  • Again, I am unsure what kind of event you want to detect, but it's entirely feasible to create a script generating an SNMP trap when you detect an event with e.g. `blkid` and then run this script in regular intervals via cron. If the script runs and detects a change, it will fire an SNMP trap. – Sven Jun 25 '13 at 15:38
  • 'what kind of event..' - I guess that's the issue. I don't think there is an 'event' as such when a card is added / removed. – ethrbunny Jun 25 '13 at 15:40

1 Answers1

1

Ok, this is naturally dependent on the OS, (I've assumed Linux so far but it was never stated). Linux has the udev system which generates events if devices are connected or disconnected.

Sven
  • 97,248
  • 13
  • 177
  • 225