+ if ((err & 0xff) == IPMI_NOT_PRESENT_CC)
+ {
+ if (list_item->sensor_not_present == 0)
+ {
+ list_item->sensor_not_present = 1;
+
+ INFO ("ipmi plugin: sensor_read_handler: sensor %s "
+ "not present.", list_item->sensor_name);
+
+ if (c_ipmi_nofiy_notpresent)
+ {
+ notification_t n = { NOTIF_WARNING, time(NULL), "", "", "ipmi",
+ "", "", "", NULL };
+
+ sstrncpy (n.host, hostname_g, sizeof (n.host));
+ sstrncpy (n.type_instance, list_item->sensor_name,
+ sizeof (n.type_instance));
+ sstrncpy (n.type, list_item->sensor_type, sizeof (n.type));
+ ssnprintf (n.message, sizeof (n.message),
+ "sensor %s not present", list_item->sensor_name);
+
+ plugin_dispatch_notification (&n);
+ }
+ }
+ }
+ else if (IPMI_IS_IPMI_ERR(err) && IPMI_GET_IPMI_ERR(err) == IPMI_NOT_SUPPORTED_IN_PRESENT_STATE_CC)
+ {
+ INFO ("ipmi plugin: sensor_read_handler: Sensor %s not ready",
+ list_item->sensor_name);
+ }
+ else
+ {
+ if (IPMI_IS_IPMI_ERR(err))
+ INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, "
+ "because it failed with IPMI error %#x.",
+ list_item->sensor_name, IPMI_GET_IPMI_ERR(err));
+ else if (IPMI_IS_OS_ERR(err))
+ INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, "
+ "because it failed with OS error %#x.",
+ list_item->sensor_name, IPMI_GET_OS_ERR(err));
+ else if (IPMI_IS_RMCPP_ERR(err))
+ INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, "
+ "because it failed with RMCPP error %#x.",
+ list_item->sensor_name, IPMI_GET_RMCPP_ERR(err));
+ else if (IPMI_IS_SOL_ERR(err))
+ INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, "
+ "because it failed with RMCPP error %#x.",
+ list_item->sensor_name, IPMI_GET_SOL_ERR(err));
+ else
+ INFO ("ipmi plugin: sensor_read_handler: Removing sensor %s, "
+ "because it failed with error %#x. of class %#x",
+ list_item->sensor_name, err & 0xff, err & 0xffffff00);
+ sensor_list_remove (sensor);
+ }