Icinga / icingadb

Icinga configuration and state database supporting multiple environments
https://icinga.com
GNU General Public License v2.0
60 stars 21 forks source link

Icingadb fails to start with readNumberAsString: invalid number #237

Closed davekempe closed 3 years ago

davekempe commented 3 years ago
FATA[0001] notificationcommandargument.NotificationCommandArgument.ArgumentOrder: readNumberAsString: invalid number, error found in #10 byte of ...|","order":"-1","valu|..., bigger context ...|da39a3ee5e6b4b0d3255bfef95601890afd80709","order":"-1","value":"\"$pushover_user$\""}|... ```

This config works fine with icinga2, but not icingadb.
I think the config in question is this:

```object NotificationCommand "pushover" {
        import "plugin-notification-command"

        command = [ SysconfDir + "/icinga2/scripts/pushover-icinga2" ]
        arguments = {
            "-k" = {
                value = "$pushover_key$"
                order = -2
            }
            "-u" = {
                value = "$pushover_user$"
                order = -1
            }
        }

        env = {
            NOTIFICATIONTYPE = "$notification.type$"
            SERVICEDESC = "$service.name$"
            HOSTALIAS = "$host.display_name$"
            HOSTADDRESS = "$address$"
            SERVICESTATE = "$service.state$"
            LONGDATETIME = "$icinga.long_date_time$"
            SERVICEOUTPUT = "$service.output$"
            NOTIFICATIONAUTHORNAME = "$notification.author$"
            NOTIFICATIONCOMMENT = "$notification.comment$"
            HOSTDISPLAYNAME = "$host.display_name$"
            SERVICEDISPLAYNAME = "$service.display_name$"
        }
}
Al2Klimov commented 3 years ago

Works for me with both master and RC1.

MariaDB [icingadb]> select * from notificationcommand_argument where command_id=(select id from notificationcommand where name='pushoverr')\G
*************************** 1. row ***************************
={�Z���            id: L�q_T�D�
2U��`���nvironment_id: �9��^kK
           command_id: �ѐ�uGӚ�M��G�
         argument_key: -k
  properties_checksum: ��"57+_�rZ���a8nY
       argument_value: "$pushover_key$"
       argument_order: -2
          description:
argument_key_override:
           repeat_key: n
             required: n
               set_if:
             skip_key: n
*************************** 2. row ***************************
                   id: =b8
                          �p0�3p�2iUף��
2U��`���nvironment_id: �9��^kK
           command_id: �ѐ�uGӚ�M��G�
         argument_key: -u
  properties_checksum: �߽9}�P4&�mA@j�DG��
       argument_value: "$pushover_user$"
       argument_order: -1
          description:
argument_key_override:
           repeat_key: n
             required: n
               set_if:
             skip_key: n
2 rows in set (0.003 sec)

MariaDB [icingadb]>
julianbrost commented 3 years ago

Closing this as we weren't able to reproduce this, received no further feedback and the code also changed quite a lot in the meantime.

If this still happens with the current master branch or RC2 once that's released, feel free to re-open the issue.