Search for a command to run...
Context. Some circumstellar-interacting (CSI) supernovae (SNe) are produced by the explosions of massive stars that have lost mass shortly before the SN explosion. There is evidence that the precursors of some SNe IIn were luminous blue variable (LBV) stars. For a small number of CSI SNe, outbursts have been observed before the SN explosion. Eruptive events of massive stars are named SN impostors (SN IMs) and whether they herald a forthcoming SN or not is still unclear. The large variety of observational properties of CSI SNe suggests the existence of other progenitors, such as red supergiant (RSG) stars with superwinds. Furthermore, the role of metallicity in the mass loss of CSI SN progenitors is still largely unexplored. Aims. Our goal is to gain insight into the nature of the progenitor stars of CSI SNe by studying their environments, in particular the metallicity at their locations. Methods. We obtain metallicity measurements at the location of 60 transients (including SNe IIn, SNe Ibn, and SN IMs) via emissionline diagnostic on optical spectra obtained at the Nordic Optical Telescope and through public archives. Metallicity values from the literature complement our sample. We compare the metallicity distributions among the different CSI SN subtypes, and to those of other core-collapse SN types. We also search for possible correlations between metallicity and CSI SN observational properties. Results. We find that SN IMs tend to occur in environments with lower metallicity than those of SNe IIn. Among SNe IIn, SN IIn-L(1998S-like) SNe show higher metallicities, similar to those of SNe IIL/P, whereas long-lasting SNe IIn (1988Z-like) show lower metallicities, similar to those of SN IMs. The metallicity distribution of SNe IIn can be reproduced by combining the metallicity distributions of SN IMs (which may be produced by major outbursts of massive stars like LBVs) and SNe IIP (produced by RSGs). The same applies to the distributions of the normalized cumulative rank (NCR) values, which quantifies the SN association to H ii regions.