Initial "official" (but unsupported) release of Geneos tools

I am very happy to announce the initial release of the Geneos tools that I originally published from my own repo but now on the ITRS Group github. At this point the contents are much the same but the directories have been reorganised in anticipation of the addition of a number of other components.

As mentioned over and over again these are not officially supported so please do not as my colleagues in Client Services to do so! Please use this topic or open a new one as appropriate.

We welcome feedback and contributions.

Nice. I am using geneos tool since 2013. Its awesome. It will be great if this is available in reasonable price in order to compete other available monitoring tools in the market.

Hi Pinku, thanks for the positive comment. This specific tool set I have announced is not Geneos itself but tool(s) to help manage large, multi-component deployments that should improve ease of use over existing shell scripts etc.

Great news and add to the forum, thanks a lot @pgalbavy :+1:

Hello Peter,

It sounds great. We would need to use the SECURE/TLS extension of SMTP and ITRS forwarded me to this place. We would need to use libmail library to send secured mails. Thank you very much for your contribution :slight_smile:

Regards

If you visit the repo page in the first post you will see the ‘assets’ below the text - libemail.so is a directly downloadable file that can be used instead of the standard release version and will automatically enable TLS if connecting to an SMTP server port that uses it (the ‘default’ setting for SMTP_TLS).

If you are already using the standard libemail.so then you will have to put this file elsewhere and refer to it using a full path name, otherwise you can also consider overwriting it in place (but the gateway may need a restart if it ever loaded the old one).

Any issues, please post here!

Hello Peter,

Thank you for your help, I have been trying to send the mails today but unfortunately I failed on my mission, getting always the undesired RC in the log:
2022-07-26 17:48:02.794+0200 INFO: ACTION API Thread 139731673134848 return = 1 for libemail.so:SendMail(33

This is how I set the config:


<action name="Monitoring mail TLS">
    <sharedLibrary>
        <libraryFile>libemail.so</libraryFile>
        <functionName>SendMail</functionName>
        <staticParameters>
            <staticParameter>
                <name>_SMTP_SERVER</name>
                <value>
                    <data>smtp.net.intra</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_FROM</name>
                <value>
                    <data>sender@domain.com</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_SUBJECT</name>
                <value>
                    <data> %(_GATEWAY) - %(_MANAGED_ENTITY) %(_DATAVIEW) %(_VARIABLE) = %(_VALUE)</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_FORMAT</name>
                <value>
                    <data>***This is an auto-generated message from ITRS Gateway %(_GATEWAY)***
-----------------------------------------------------------------
Triggered at value:  %(_VALUE)
-----------------------------------------------------------------
</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_TO</name>
                <value>
                    <data>samuel.echevarria@domain.com</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_SMTP_USERNAME</name>
                <value>
                    <data>sender@domain.com</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_SMTP_PASSWORD_FILE</name>
                <value>
                    <data>mailpassword</data>
                </value>
            </staticParameter>
            <staticParameter>
                <name>_SMTP_TLS</name>
                <value>
                    <data>default</data>
                </value>
            </staticParameter>
        </staticParameters>
    </sharedLibrary>
</action>
****

If you have other configuration please let me know if I am missing a parameter.

Thank you

Regards

I do not see an SMTP_PORT in that config - for SSL/TLS you normally need to use a port other than 25 (the default). There is either the “msa” port (587) or the STARTTLS supporting port 465 (I think). Best check with your admins and/or test connectivity by hand first.

Also check the stderr output of the gateway, maybe gateway.txt if you use gatewayctl to run the gateway - it may contain more info. The challenge with writing code that makes debugging this stuff without spamming normal logs.

Also, I suggest ensuring you are calling the correct libemail.so file by using the full, absolute path in the libraryFile field.

Hello Peter,

Thank you for your feedback. May I ask you if you have an example XML of the action? Maybe I can use the same that works for you to discard other potential issues.

Thank you in advance

This one works for me (filling in the vars as appropriate):


<action name="test email">
	<sharedLibrary>
		<libraryFile>/home/peter/geneos/gateway/gateway_shared/libemail.so</libraryFile>
		<functionName>SendMail</functionName>
		<staticParameters>
			<staticParameter>
				<name>_SMTP_SERVER</name>
				<value>
					<data>smtp.gmail.com</data>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_SMTP_PORT</name>
				<value>
					<data>587</data>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_SMTP_USERNAME</name>
				<value>
					<var ref="username"/>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_SMTP_PASSWORD_FILE</name>
				<value>
					<var ref="password_file"/>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_FORMAT</name>
				<value>
					<data>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vivamus arcu felis bibendum ut tristique et egestas quis. Consequat nisl vel pretium lectus quam id leo in. Faucibus interdum posuere lorem ipsum dolor sit amet. Eu feugiat pretium nibh ipsum consequat nisl. Vitae tempus quam pellentesque nec. Consectetur purus ut faucibus pulvinar. Morbi tristique senectus et netus et malesuada fames. Sem viverra aliquet eget sit amet tellus cras. Pretium viverra suspendisse potenti nullam ac tortor vitae purus faucibus. Montes nascetur ridiculus mus mauris. Vulputate dignissim suspendisse in est ante in nibh mauris. Parturient montes nascetur ridiculus mus.

Fames ac turpis egestas maecenas pharetra. Aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod. Libero enim sed faucibus turpis in eu. Proin sagittis nisl rhoncus mattis rhoncus urna neque viverra. Molestie at elementum eu facilisis sed odio morbi quis. Et malesuada fames ac turpis egestas integer eget aliquet nibh. Sit amet mattis vulputate enim nulla aliquet porttitor. Mi ipsum faucibus vitae aliquet nec ullamcorper. Dui faucibus in ornare quam viverra. Placerat vestibulum lectus mauris ultrices eros in cursus turpis massa. Odio euismod lacinia at quis.

Pellentesque adipiscing commodo elit at. Eget arcu dictum varius duis at. Nunc sed augue lacus viverra vitae congue eu consequat ac. Lobortis mattis aliquam faucibus purus in. Aliquet enim tortor at auctor urna nunc id cursus. Est pellentesque elit ullamcorper dignissim cras tincidunt. Lobortis feugiat vivamus at augue eget arcu dictum varius duis. Augue mauris augue neque gravida in fermentum. Massa placerat duis ultricies lacus sed turpis tincidunt id aliquet. Vitae semper quis lectus nulla at volutpat diam. Enim facilisis gravida neque convallis. Tempor orci eu lobortis elementum nibh tellus molestie.

Sed pulvinar proin gravida hendrerit lectus a. Diam vel quam elementum pulvinar etiam. Nulla posuere sollicitudin aliquam ultrices sagittis. Luctus venenatis lectus magna fringilla urna porttitor rhoncus. Vel orci porta non pulvinar neque laoreet suspendisse. In fermentum posuere urna nec. Venenatis tellus in metus vulputate. Aliquet lectus proin nibh nisl condimentum. Id consectetur purus ut faucibus pulvinar elementum integer. Ultrices sagittis orci a scelerisque purus. Purus gravida quis blandit turpis cursus. Euismod in pellentesque massa placerat duis ultricies. Justo nec ultrices dui sapien eget. Viverra mauris in aliquam sem fringilla ut morbi. Lacus suspendisse faucibus interdum posuere lorem ipsum.

Leo integer malesuada nunc vel risus. Dictum at tempor commodo ullamcorper a. Nulla facilisi cras fermentum odio eu feugiat. Consequat id porta nibh venenatis cras sed. Lectus nulla at volutpat diam ut venenatis tellus. Aliquam purus sit amet luctus venenatis lectus magna. In vitae turpis massa sed. Quis varius quam quisque id diam vel. Nulla posuere sollicitudin aliquam ultrices sagittis orci a scelerisque purus. Ullamcorper velit sed ullamcorper morbi tincidunt. Pharetra magna ac placerat vestibulum.</data>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_TO</name>
				<value>
					<var ref="to"/>
				</value>
			</staticParameter>
			<staticParameter>
				<name>_FROM</name>
				<value>
					<var ref="from"/>
				</value>
			</staticParameter>
		</staticParameters>
	</sharedLibrary>
</action>

Dear Peter,
Thank you so much for your details, after several attempts I am unable to make it run :slight_smile: , do you know if the password must be specified in base64 in the file?

Thank you!! :wink:

The password should be in clear text in the password file, no encoding is supported (yet).

Worth noting that in my example XML the password file is referenced via a variable - perhaps just use an absolute path to test, e.g. /tmp/passwd.txt, and see if it any better.