CLIP-HPC / goslmailer

GoSlurmMailer - drop in replacement for default slurm MailProg. Delivers slurm job messages to various destinations.
MIT License
42 stars 6 forks source link

weird message coming from the slurm bot in goslmailer #34

Open hariseldon99 opened 1 year ago

hariseldon99 commented 1 year ago

I've added my tgslurmbot to a group as admin where it posts messages. Since a couple of days ago, every time anyone posts something, it replies:

Sorry, I'm not programmed to reply,to get the slurm command line switch to receive messages type: /start

The log files show nothing when this happens.

My config is:

/etc/slurm/goslmailer.conf

{                                                   
  "logfile": "/var/log/goslmailer/goslmailer.log",                 
  "debugconfig": true,                              
  "binpaths": {                                     
    "sacct":"/usr/bin/sacct",
    "sstat":"/usr/bin/sstat"
  },
  "defaultconnector": "msteams",                    
  "connectors": {                                   
    "msteams": {                                    
      "name": "dev channel",                        
      "renderToFile": "yes",                        
      "spoolDir": "/tmp",                           
      "url": "https://msteams/webhook/url",         
      "adaptiveCardTemplate": "/path/template.json",
      "useLookup": "GECOS"                          
    },                                              
    "mailto": {
      "name": "original slurm mail functionality, extended.",
      "mailCmd": "/usr/bin/mutt",                        
      "mailCmdParams": "-s \"Job {{ .SlurmEnvironment.SLURM_JOB_ID }} ({{ .SlurmEnvironment.SLURM_JOB_NAME }}) {{ .SlurmEnvironment.SLURM_JOB_MAIL_TYPE }}\"",
      "mailTemplate": "/etc/slurm/mailTemplate.tmpl",    
      "mailFormat": "HTML",                              
      "allowList": ".+@(imp|imba.oeaw|gmi.oeaw).ac.at"  
    },
    "telegram": {
      "name": "telegram bot",                       
      "url": "",                                    
      "token": "PHAKETOKEN",         
      "renderToFile": "no",                         
      "spoolDir": "/var/spool/telegramgobs",              
      "messageTemplate": "/etc/slurm/telegramTemplate.md",  
      "useLookup": "no",                            
      "format": "MarkdownV2"                        
    },
    "discord": {
      "name": "DiscoSlurmBot",                      
      "triggerString": "showmeslurm",               
      "token": "PasteBotTokenHere",                 
      "messageTemplate": "/path/to/template.md"     
    },
    "mattermost": {
      "name": "MatTheSlurmBot",                    
      "serverUrl": "https://someSpaceName.cloud.mattermost.com",  
      "wsUrl": "wss://someSpaceName.cloud.mattermost.com",        
      "token": "PasteBotTokenHere",                               
      "triggerString": "showmeslurm",                             
      "messageTemplate" : "/path/to/mattermostTemplate.md"        
    },
    "matrix": {
      "username": "@myuser:matrix.org",
      "token": "PHAKETOKEN",
      "homeserver": "matrix.org",
      "template": "/path/to/matrix_template.md"
    },
    "slack": {
      "token": "PasteSlackBotTokenHere",            
      "messageTemplate": "/path/to/template.md",    
      "renderToFile": "spool",                      
      "spoolDir": "/tmp"                            
    },
    "textfile": {                                   
      "path": "/tmp"                                
    }
  },
  "qosmap": {              
    "elevated": 604800,
    "normal": 43200
  }
}

/etc/slurm/tgslurmbot.conf

{                                                   
  "logfile": "/var/log/goslmailer/tgslurmbot.log",                 
  "debugconfig": true,                              
  "binpaths": {                                     
    "sacct":"/usr/bin/sacct",
    "sstat":"/usr/bin/sstat"
  },
  "defaultconnector": "telegram",                    
  "connectors": {                                   
    "telegram": {
      "name": "testbot",                       
      "url": "",                                    
      "token": "PHAKE-TOKEN",         
      "renderToFile": "no",                         
      "spoolDir": "/var/spool/telegramgobs",              
      "messageTemplate": "/etc/slurm/telegramTemplate.md",  
      "useLookup": "no",                            
      "format": "MarkdownV2"                        
    }
  },
  "qosmap": {              
    "elevated": 43200,
    "normal": 604800
  }
}

/etc/systemd/system/tgslurmbot.service

[Unit]
Description=TelegramBot for goslmailer
DefaultDependencies=no
Wants=network-online.target
After=network.target network-online.target

[Service]
Type=simple
User=slurm
WorkingDirectory=/
ExecStart=/usr/local/bin/tgslurmbot

[Install]
WantedBy=multi-user.target