Understanding changes in parameters recorded by automated health monitoring systems based on ear-attached sensors on the days immediately before and after diagnosis of metritis and clinical mastitis can help develop dairy cow health monitoring strategies. The objective of this observational cohort study was to characterize rumination time, physical activity, and lying time monitored by an ear-attached sensor before, during, and after clinical diagnosis (CD) of metritis and clinical mastitis. Lactating Holsteins monitored daily for 21 d in milk for detection of health disorders were retrospectively included in the no clinical health disorder group (NCHD; n = 616) if no disorders were diagnosed. Cows were included in the metritis (MET; n = 69) or clinical mastitis (MAST; n = 36) group if diagnosed only with nonsevere metritis (watery, reddish, and fetid uterine discharge with or without pyrexia) or nonsevere clinical mastitis (visibly abnormal milk secretion with or without signs of udder inflammation, with no pyrexia and no systemic signs of disease), respectively. Cows diagnosed with severe metritis (signs of metritis plus systemic signs of disease) or severe clinical mastitis (signs of mastitis plus pyrexia and systemic signs of disease), and cows diagnosed with nonsevere metritis or clinical mastitis plus another disorder within -7 to +7 d of CD of metritis or clinical mastitis diagnosis, were included in the metritis plus (MET+; n = 25) or the clinical mastitis plus (MAST+; n = 15) group, respectively. Cows were fitted with an ear-attached accelerometer to measure rumination time, physical activity, and lying time. Mean daily values, mean value absolute change, and relative change for the mean daily value from 3 or 5 d before CD to the nadir for cows with metritis and clinical mastitis, respectively, were analyzed with linear mixed models with or without repeated measures. Rumination time and physical activity were lesser, and lying time was greater for the MET and MET+ groups than for the NCHD group for most days from -4 to +7 d of CD of metritis. Generally, daily rumination time, physical activity, and lying time differences were greater and more prolonged between the MET+ and NCHD than between the MET and NCHD groups. Similarly, cows in the MAST and MAST+ groups had lesser rumination time and physical activity than cows in the NCHD group for several days before diagnosis. Lying time was greater for the MAST+ than the NCHD group on d -1 and 0 relative to CD. Absolute values and relative changes from 3 d before CD to the day of the nadir for rumination time and physical activity, or peak for lying time, were different for cows in the MET and MET+ groups than for the NCHD group. Similar results were observed for the MAST and MAST+ groups compared with the NCHD group. For cows with metritis, either an increase in rumination time and physical activity or a decrease in lying time was observed from the day of CD to resolution of clinical signs, but no changes were observed for the NCHD. Cows with clinical mastitis and the NCHD group had different rumination times, physical activity, and lying times on the day of CD and resolution of clinical signs, but cows with clinical mastitis had no significant changes from the day of CD to resolution of clinical signs. We conclude that cows affected by metritis and clinical mastitis presented substantial alterations of the patterns of rumination time, physical activity, and lying time captured by an ear-attached sensor. Thus, automated health monitoring systems based on ear-attached sensors might be used as an aid for identifying cows with metritis and clinical mastitis. Moreover, behavioral parameter changes after CD might be good indicators of resolution of clinical signs of metritis but not mastitis.