Every officer to whom reports are required by law to be made and for the failure to make which a penalty or fine or forfeiture is provided, shall give immediate written notice of such failure to the delinquent and to the proper county attorney. Such county attorney shall thereupon institute proper proceedings to collect such penalty, fine, or forfeiture. Upon complaint of the district superintendent, or when it comes to the attorney’s knowledge that any school officer has violated any provision of law for which violation a penalty, fine or forfeiture is provided, such attorney shall institute like proceedings.