Apparatus is provided, including a support (21) configured to be implanted within a body of a subject and a sampling region (30, 1430) coupled to the support (21). The apparatus is configured to passively allow passage through the sampling region (30, 1430) of at least a portion of fluid from the subject. The apparatus also includes an optical measuring device in optical communication with the sampling region (30, 1430). The optical measuring device comprises at least one light source (40) configured to transmit light through at least a portion of the fluid, and at least one sensor (42) configured to measure a parameter of the fluid by detecting light passing through the fluid. Other applications are also described.